Regarding:
select * from table1 where field1='x' or field2='y'
Hi, Ray,
I believe you sent two messages -- the first with "OR" and the second with
"AND".
Since your subject consistently says "OR" and your last email says "AND" I'll
assume you meant "AND".
Sqlite using a maximum of one index per table per select.
In order to perform your "OR" select, it must scan every the table.
You may want to create a compound index of both fields.
(Or maybe a "UNION ALL" would be fast? You can use EXPLAIN QUERY PLAN to
analyze.)
Hope this helps,
Donald
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users