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

2007-09-12 Thread ser-ega
IT> LIKE is case-insensitive by default. To have it use your index, you need 
IT> to either make the index case-insensitive:
IT> 
IT> CREATE INDEX test_name ON test (name COLLATE NOCASE);

Sorry, tried to create the index this way, but it still isn't used by the query.

telega)

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



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

2007-09-12 Thread ser-ega
IT> LIKE is case-insensitive by default. To have it use your index, you need 
IT> to either make the index case-insensitive:

Thanks! It's clear now.

IT> What's the point of using LIKE if you don't have any wildcards in the 
IT> pattern?

Actually I do have wildcards, this was just a test, my actual query is:
var statement = connection.createStatement("SELECT * FROM addressBook WHERE 
name LIKE ?1 OR email LIKE ?1");
statement.bindString(statement, 0, text + "%");

telega)

-
To unsubscribe, send email to [EMAIL PROTECTED]
-