On Thu, Jan 12, 2017 at 5:33 PM, Richard Hipp <d...@sqlite.org> wrote: > On 1/12/17, Luca Ferrari <fluca1...@infinito.it> wrote: > >> One thing I was not expecting was SQLite to use the index at all: >> since the query does not apply any filter (where clause), it simply >> states that the user wants all the rows, and while it is true that the >> order is something the engine can choose, why bother traversing an >> index instead of a direct scan of the table? > > Because the index is smaller than the main table. Less disk I/O.
Shame on me, it was selecting the columns of the index... Thanks for the explaination. Luca _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users