"P?ter Szab?" <[EMAIL PROTECTED]> wrote: > Dear SQLite Developers, > > I am seeking help for optimizing my SQLite SQL query, which seems to > be running unreasonably slow. The query is: > > SELECT col2 FROM t WHERE col1='foobar' AND > col4='foobarfoobarfoobarfoob'; > > My schema is the following: > > CREATE TABLE t ( > col1 text NOT NULL, > col2 integer NOT NULL, > col3 integer NOT NULL, > col4 text NOT NULL, > col5 text NOT NULL, > PRIMARY KEY(col1, col2, col3, col4, col5), > UNIQUE(col1, col4, col5), > UNIQUE(col4, col5, col1), > UNIQUE(col5, col4, col1), > );
Just a guess: try SELECT +col2 FROM t ... Regards