Last active
October 6, 2015 21:48
-
-
Save garncarz/be914a7e4581b013e143 to your computer and use it in GitHub Desktop.
Making Firefox faster again
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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