sqlite-users  

[sqlite] Like doesn't always use index with callate nocase

ge...@iol.it
Tue, 09 Feb 2010 06:53:17 -0800

Dear all,
I have a problem using sqlite 3.6.22. I create a table with callate nocase 
definition and an index as following:

create table Test
(
  Text_Value  text collate nocase
);

create index Test_Text_Value_Index
  on Test (Text_Value collate nocase);

Running the statement:

select * from Test where Text_Value like 'a%';

sqlite  uses the index correctly, but with the statement:

select * from Test where Text_Value like 'a';

it doesn't use the index. According to documentation "The SQLite Query 
Planner: 4.0 The LIKE optimization" it should use the index (could be a small 
bug in the query optimizer?).

Thanks in advance for your help.


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
  • [sqlite] Like doesn't always use index with callate nocase ge...@iol.it