Hi Igor,

Wow - changing to that in combination with indexes on player1 and 
player2 has dropped the time to 25 and 10 - an incredible improvement.

I'll need to get my head around using combinations of queries which each 
only use indexed columns.

Thanks,
Ian

On 08/02/2011 13:48, Igor Tandetnik wrote:
> SELECT * FROM multiturnTable WHERE rowid in (
>    select rowid from multiturnTable where player1 LIKE ?
>    union all
>    select rowid from multiturnTable where player2 LIKE ?
> )
> AND (complete=0 OR p1SubmitScore=0 OR p2SubmitScore=0) AND
> p1Declined=0 AND p2Declined=0;

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

Reply via email to