Regarding: "I thought I can create two separate indexes"
I believe sqlite can use at most *one* index per table in a select.
However, you can create *compound* indicies (though all the restrictions
pointed to by Dr. H still apply)
http://www.sqlite.org/optoverview.html#like_opt
This
I get the index for LIKE working by specifying COLLATE in the CREATE TABLE:
CREATE TABLE test (name STRING COLLATE NOCASE), but...
IT> Besides, your statement uses OR in the WHERE clause. An index can't be
IT> used for such query even if you had plain old equality test in place of
IT> LIKE.
[EMAIL PROTECTED] wrote:
LIKE is case-insensitive by default. To have it use your index, you
need to either make the index case-insensitive:
Thanks! It's clear now.
What's the point of using LIKE if you don't have any wildcards in the
pattern?
Actually I do have wildcards, this was just a
3 matches
Mail list logo