I have 2 tables with tth hashes, and i need to get which of them, who exist in first table but not exist in second table.
I’ll try something like this:
SELECT f.*
FROM files as f
LEFT JOIN trans as t ON t.tth=f.tth
WHERE t.id IS NULL
But it’s working very slow, in first table 65k lines, and second table with 130k lines, so query working for ~5 minutes.
Here exist another way?
Thanks.
P.S. All columns in both tables having indexes.
Thanks, OMG Ponies, I read an article on the link, and a little optimizing method using NOT IN, query rate was ~ 0.6 seconds.