Re: [sqlite] Index is not being used

2009-12-19 Thread D. Richard Hipp
On Dec 19, 2009, at 3:12 PM, Igor Tandetnik wrote: > > To find all strings beginning with 'a', consider using something > like this: > > SELECT * FROM mytable WHERE mycolumn2 >= 'a' and mycolumn2 < 'b'; Or: SELECT * FROM mytable WHERE mycolumn2 GLOB 'a*'; D. Richard Hipp d...@hwaci.com

Re: [sqlite] Index is not being used

2009-12-19 Thread Igor Tandetnik
Bert Nelsen wrote: > I have the problem that one index is not taken into account when I execute a > query: > > Second column index: > name: idx_mycolumn2 > collation: - > unique: false > -- > > Results for "SELECT * FROM mytable WHERE mycolumn2 LIKE 'a%'" > 0 > TABLE mytable LIKE is

[sqlite] Index is not being used

2009-12-19 Thread Bert Nelsen
Hello! I have the problem that one index is not taken into account when I execute a query: I have 1 table with 2 columns. Each column has an index, but EXPLAIN QUERY PLAN tells me that the second index is not being used. -- First column: name: mycolumn1 type: text collation: nocase unique: