Moreover if I make field LIKE 'AA%' and I use INDEXED BY index_on_field shell return me "Error: no query solution" so it's seams sqlite with LIKE operator can't use index on field
Selea s.r.l. Michele Pradella R&D SELEA s.r.l. Via Aldo Moro 69 Italy - 46019 Cicognara (MN) Tel +39 0375 889091 Fax +39 0375 889080 *michele.pradella at selea.com* <mailto:michele.pradella at selea.com> *http://www.selea.com* Il 12/02/2016 11.39, Michele Pradella ha scritto: > Ok understood...anyway trying with sqlite shell it's seams that (filed > LIKE 'AA%') is slower than (field>='AAA' AND field<='AAZ') > do you think there's a way I can check if the optimization is working? > > Selea s.r.l. > > > Michele Pradella R&D > > > SELEA s.r.l. > > Via Aldo Moro 69 > Italy - 46019 Cicognara (MN) > Tel +39 0375 889091 > Fax +39 0375 889080 > *michele.pradella at selea.com* <mailto:michele.pradella at selea.com> > *http://www.selea.com* > Il 12/02/2016 11.23, Simon Slavin ha scritto: >> 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 > > _______________________________________________ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users