Swithun Crowe wrote:
> 
> How about something like:
> 
> DELETE FROM log 
>       WHERE id IN (SELECT id 
>                      FROM log 
>                  ORDER BY timestamp DESC 
>                     LIMIT 10000,9999999);
> 
> Which will only be one delete statement, instead of thousands.
I will try that, it sounds much better. I'm definitely no SQL expert so I
didn't think of nested queries. Thanks!

-- 
View this message in context: 
http://www.nabble.com/Slow-SELECT-query-tp25294597p25295879.html
Sent from the SQLite mailing list archive at Nabble.com.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to