Hello,

I have a database with about 137000 * 2 rows with four columns;
fileid, filename, filepath and istarget.
It's used to determine if two scanned directories are equal so I run a
simply query to get the rows that are missing on the target directory
but do exists in the source directory.

I use this query:

SELECT f.filepath, f.filename FROM files f
WHERE f.istarget=0
AND NOT EXISTS (SELECT * FROM files WHERE filepath=f.filepath AND
filename=f.filename AND istarget=1)

and I have experimented with some index to improve the speed, both
index (filename, filepath, istarget), (filename), (filepath) etc...

I am still not quite satisfied with the speed (a few seconds to check this).
Perhaps the table schema itself is the problem? Can someone help me?

Regards,
Jonas
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to