Re: [sqlite] Could someone explain why this query is so slow

2011-09-21 Thread Paul Sanderson
Ahh I was sure that this was being created :( ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Could someone explain why this query is so slow

2011-09-21 Thread Igor Tandetnik
On 9/21/2011 12:19 PM, Paul Sanderson wrote: Thanks Igor That makes sense but if I drop MD5 from the query (the vast majority of MD5 values would be null anyway) and use select ID FROM rtable WHERE search> 0 and isf = 0 ORDER BY afo The result from explain query plan is 0|0|0 SCAN TABLE rtable

Re: [sqlite] Could someone explain why this query is so slow

2011-09-21 Thread Paul Sanderson
Thanks Igor That makes sense but if I drop MD5 from the query (the vast majority of MD5 values would be null anyway) and use select ID FROM rtable WHERE search > 0 and isf = 0 ORDER BY afo The result from explain query plan is 0|0|0 SCAN TABLE rtable (~3 rows) >> 0|0|0 USE TEMP B-TREE FOR

Re: [sqlite] Could someone explain why this query is so slow

2011-09-21 Thread Igor Tandetnik
Paul Sanderson wrote: > select ID FROM rtable WHERE search > 0 and MD5 is NULL and isf = 0 ORDER BY > afo > > explain query plan gives the following for the initial query > 0|0|0 SEARCH TABLE rtable USING INDEX md5_a (md5=?) (~2 rows) > 0|0|0 USE TEMP B-TREE FOR