On Jun 14, 2006, at 16:16 UTC, Paul Smith wrote:

> >  SELECT <fields> FROM <table> WHERE recID IN (<record IDs> ORDER BY dateFld
> >
> >I have a unique index on recID, and an index on dateFld.
> 
> Try making another index on both fields at once. SQLite can only use one 
> index at a time for each query.

Aha, that's probably it.  If I were the query engine, faced with this problem, 
I would certainly use the recID index to satisfy the WHERE clause.  I'll see if 
a combination index makes any difference.

Thanks for the pointer to the EXPLAIN command, too.

Best,
- Joe

--
Joe Strout -- [EMAIL PROTECTED]
Verified Express, LLC     "Making the Internet a Better Place"
http://www.verex.com/

Reply via email to