Re: [sqlite] LIKE, BETWEEN

2004-10-13 Thread Raymond Irving
This is very strange. Common sense will tell us that a BETWEEN call on the "a" column should use the index "t_idx_0". I can't see why SQLite is doing a table scan. Is this another one of those code-optimized features of SQLite to forget intelligent parsing and processing in order to reduce DLL

[sqlite] LIKE, BETWEEN

2004-10-13 Thread Mike Ponomarenko
In sqlite3 queries using LIKE and BETWEEN do not use existing indices. So for a schema like CREATE TABLE t (a integer, b char(40)); CREATE INDEX t_idx_0 ON t(a); CREATE INDEX t_idx_1 ON t(b); queries like "SELECT * FROM t WHERE a BETWEEN 1 AND 20"or "SELECT * FROM t WHERE b LIKE 'abc%'" end