I figure out a better solution than the two I initially proposed:

Create a temp table to put the image names into and then use a left outer
join to get the answer.

Sam

On Mon, May 4, 2009 at 7:49 PM, Sam Carleton <scarle...@miltonstreet.com>wrote:

> Here is my situation:
>
> I have a SQLite table that has a customer id, the folder id, and the image
> id (filename).  This is a favorites table, so for a given customer and
> folder, there is going to be a small set of images in the table.
>
> The operation is to scan the folder/directory on the HD for all the images
> and return that list with a flag indicating if the image is in the favorites
> table.
>
> The expectation is that for a given customer and folder there will be less
> than 10 images selected.
>
> What would be faster, preparing the SELECT statement and running it for
> every file found or getting all the images for that customer in that folder,
> storing in a STL map and looking up the subset in the STL map?  Or is it
> such a small difference either will work?
>
> Sam
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to