Re: [sqlite] index confusion

2011-07-17 Thread dcharno
On 07/17/2011 09:50 AM, Simon Slavin wrote: > > On 17 Jul 2011, at 2:40pm, dcharno wrote: > >> I have a table where columns a and b form a unique key for column c. In >> an attempt to speed up queries I added an index on a and b. >> >>CREATE TABLE t(a TEXT, b TEXT, c TEXT, CONSTRAINT u

Re: [sqlite] index confusion

2011-07-17 Thread Igor Tandetnik
dcharno wrote: > I have a table where columns a and b form a unique key for column c. In > an attempt to speed up queries I added an index on a and b. > > CREATE TABLE t(a TEXT, b TEXT, c TEXT, CONSTRAINT u UNIQUE(a,b)); > CREATE INDEX iab ON t(a, b); Don't create that

Re: [sqlite] index confusion

2011-07-17 Thread Simon Slavin
On 17 Jul 2011, at 2:40pm, dcharno wrote: > I have a table where columns a and b form a unique key for column c. In > an attempt to speed up queries I added an index on a and b. > > CREATE TABLE t(a TEXT, b TEXT, c TEXT, CONSTRAINT u UNIQUE(a,b)); > CREATE INDEX iab ON t(a, b); > > But,

[sqlite] index confusion

2011-07-17 Thread dcharno
I have a table where columns a and b form a unique key for column c. In an attempt to speed up queries I added an index on a and b. CREATE TABLE t(a TEXT, b TEXT, c TEXT, CONSTRAINT u UNIQUE(a,b)); CREATE INDEX iab ON t(a, b); But, an automatic index is being used even though it seems