Hello, I recently updated from 3.4.2 to 3.7.3 and the glob and like
operators are now not using the indexes.
My table "dict" has a column named "word" without defined type, containing
utf-8 words. The index is:
CREATE INDEX wordidx on dicts (word);

explain query plan SELECT * from dicts where word like 'xxxx%'  limit
1;
0|0|TABLE dicts


sqlite> explain query plan SELECT * from dicts where word glob 'xxxx*'
limit 1;
0|0|TABLE dicts

BUT:
sqlite> explain query plan SELECT * from dicts where word > 'xxxx'  limit
1;
0|0|TABLE dicts WITH INDEX wordidx

using collate binary before the "limit" in glob or like doesn't help. using
PRAGMA case_sensitive_like = 0/1 didn't help either.
Is this a bug?
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to