RE: [sqlite] Re: Re: Index usage with LIKE queries

2007-09-12 Thread Griggs, Donald
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

Re: [sqlite] Re: Re: Index usage with LIKE queries

2007-09-12 Thread ser-ega
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.