Re: [sqlite] Efficient select for multiple ids

2004-09-15 Thread D. Richard Hipp
Ken Cooper wrote: SELECT id, . FROM additionalchunks WHERE id=? OR id=? OR . or SELECT id, . FROM additionalchunks WHERE id in (? ? ? ? ? .) Which of these is the more efficient... The second, assuming you have an index on additionalchunks.id. Without an index, they are about the same. -- D.

RE: [sqlite] Efficient select for multiple ids

2004-09-15 Thread Ken Cooper
The '.'s below should be ellipses. -Original Message- From: Ken Cooper [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 15, 2004 1:56 PM To: [EMAIL PROTECTED] Subject: [sqlite] Efficient select for multiple ids I am implementing a virtualized listview on the result of a query

[sqlite] Efficient select for multiple ids

2004-09-15 Thread Ken Cooper
I am implementing a virtualized listview on the result of a query by first retrieving all unique ids for each row in the query result, then on demand looking up additional information based on the ids in small chunks, say 20 at a time. I was thinking the best way to approach this second query was