Re: [sqlite] optimizer question

2007-07-20 Thread Dan Kennedy
On Thu, 2007-07-19 at 22:56 +0100, Colin Manning wrote: > Hi > > If I have a table with a couple of indexed varchar fields e.g: > > CREATE TABLE t (id INT, a VARCHAR(20), b VARCHAR(20)...); > CREATE INDEX ia ON t(a); > CREATE INDEX ib ON t(b); > > then will the sqlite query optimizer use these i

Re: [sqlite] optimizer question

2007-07-20 Thread drh
Colin Manning <[EMAIL PROTECTED]> wrote: > Hi > > If I have a table with a couple of indexed varchar fields e.g: > > CREATE TABLE t (id INT, a VARCHAR(20), b VARCHAR(20)...); > CREATE INDEX ia ON t(a); > CREATE INDEX ib ON t(b); > > then will the sqlite query optimizer use these indices in these

[sqlite] optimizer question

2007-07-19 Thread Colin Manning
Hi If I have a table with a couple of indexed varchar fields e.g: CREATE TABLE t (id INT, a VARCHAR(20), b VARCHAR(20)...); CREATE INDEX ia ON t(a); CREATE INDEX ib ON t(b); then will the sqlite query optimizer use these indices in these SELECT's: 1. SELECT * FROM t WHERE a LIKE 'M%'; 2. SELEC

[sqlite] optimizer question

2007-07-19 Thread Colin Manning
Hi If I have a table with a couple of indexed varchar fields e.g: CREATE TABLE t (id INT, a VARCHAR(20), b VARCHAR(20)...); CREATE INDEX ia ON t(a); CREATE INDEX ib ON t(b); then will the sqlite query optimizer use these indices in these SELECT's: 1. SELECT * FROM t WHERE a LIKE 'M%'; 2. SELEC