O'Toole, Eamonn wrote:
>                     DELETE FROM object
>                     WHERE name = ? AND (created_at < ?)

This needs an index with "name" as the *first* column.

>                     query += ' AND deleted IN (0, 1)'

If the name column is (nearly) unique, putting indexes on the created_at
or deleted columns is not useful (for this query).

See <http://www.sqlite.org/queryplanner.html> for an explanation of how
indexes work.


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to