Rather than doing batch deletes why don't you add a date/time constraint to your selects? Then, you can have a thread which does a lazy delete on the old data. Or, you can create a trigger on inserts which deletes anything older than N-days or such. Or...if all you want is an interruptable process do your delete from a select statement one record at a time. It should take about the same amount of time but your users wouldn't notice it. Your never going to get through 600MB of data and 5 million records in "seconds". Michael D. Black Senior Scientist Advanced Analytics Directorate Northrop Grumman Information Systems
________________________________ From: sqlite-users-boun...@sqlite.org on behalf of Michele Pradella Sent: Fri 10/8/2010 4:06 AM To: General Discussion of SQLite Database Subject: EXTERNAL:Re: [sqlite] Speed up DELETE of a lot of records I try 320000 and it takes same time. Moreover the RAM used is about 500MB Even with "PRAGMA synchronous = OFF;" operation time is the same. I think the only way for now is to make more DELETE with less element, but it's not the best way
_______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users