Hello all,

The documentation for partial indexes (section 3.2) lists "=, <, >, <=,
 >=, <>, or IN" as operators that will trigger the use of an
index WHERE c IS NOT NULL.

It seems to me that LIKE should also be in that list, given that it
will also only match when c is not null.

I can force the query planner to say it will use the index by querying
as such:

    WHERE col IS NOT NULL and col LIKE 'expr%'

But am I correct in thinking that SQLite is still scanning though the
table to evaluate expr%? If so, then am I also correct in thinking that
if I want LIKE to use an index it has to be a full index?

Regards,
Mark
-- 
Mark Lawrence
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to