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 to
create and bind queries something like the following against the 20 ids I
have at the time:

 

SELECT id, . FROM additionalchunks WHERE id=? OR id=? OR . 

 

or

 

SELECT id, . FROM additionalchunks WHERE id in (? ? ? ? ? .)

 

Which of these is the more efficient way to approach the problem, or does
someone have a better suggestion? I remember seeing something referring to
this issue posted awhile back, but I'm having trouble locating it (googling
on 'where' and 'or' and 'in' is rather painful.).

 

Ken

Reply via email to