Skip to content

Instantly share code, notes, and snippets.

@garncarz
Last active October 6, 2015 21:48
Show Gist options
  • Save garncarz/be914a7e4581b013e143 to your computer and use it in GitHub Desktop.
Save garncarz/be914a7e4581b013e143 to your computer and use it in GitHub Desktop.
Making Firefox faster again
select count(*) from moz_historyvisits;
-- 14304
select count(*) from moz_historyvisits where visit_date >= (
select min(visit_date) from (
select visit_date from moz_historyvisits order by visit_date desc limit 2000
)
);
-- 2000
-- making sure it'll work
delete from moz_historyvisits where visit_date < (
select min(visit_date) from (
select visit_date from moz_historyvisits order by visit_date desc limit 2000
)
);
select count(*) from moz_historyvisits;
-- 2000
-- it worked
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment