On 11 Jul 2013, at 3:17am, Igor Tandetnik <i...@tandetnik.org> wrote:

> SQLite believes that the fastest way is to start by finding 
> status_timeline_relationship records with timeline_id = 2, then join those 
> back to status and sort the result.
> 
> It seems that ix_status_timeline_relationship_timeline_id index is not very 
> selective (lots of records with the same timeline_id, many more than SQLite 
> expects). You may want to drop it.

Better still, create an index with both columns in.  In fact create one in each 
order and see which one SQLite wants to use.  Having done an ANALYZE, of course.

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

Reply via email to