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.

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

2007-09-12 Thread Igor Tandetnik
[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