If and only If you follow rule 6 and declare the column with a collation sequence that matches the collation in effect for the LIKE operator.
So if the column/index is declared with CASE SENSITIVE collation (BINARY, the default), and you use like on that column, and the LIKE is case insensitive (the default) then the index will not be used to optimize this constraint. You must change the collations somewhere so that they match. > -----Original Message----- > From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users- > bounces at mailinglists.sqlite.org] On Behalf Of Simon Slavin > Sent: Friday, 12 February, 2016 03:24 > To: SQLite mailing list > Subject: Re: [sqlite] query Benchmark > > > On 12 Feb 2016, at 10:14am, Michele Pradella <michele.pradella at selea.com> > wrote: > > > I can make the query: > > SELECT field FROM car_plates WHERE > (field>='EX011A')AND(field<='EX011Z'); > > now I can use the index the query is faster. > > SQLite makes this optimization for you. See section 4.0 of > > <https://www.sqlite.org/optoverview.html> > > Simon. > _______________________________________________ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users