mardi 13 janvier 2015

SQLITE : Compare rows of 4 tables with their corresponding old version tables, fastest approach?

I have 4 tablesA,B,C and D and their corresponding old versions old A,old B,old C and old D. I want to check presence of each row of A in old A , B with old B, C with old C and D with old D and stop as soon as first distinct row is detected.


What is the fastest way to do that? (It is known that the sum of rows of A,B,C and D is maximum 40,000 and row comparison is on the basis of four columns)


I am thinking of writing a complex query based on select - case. Is that approach efficient. What I am concerned is the tables should not be locked for long period (though here no locking may be involved as we are doing only read operation).


Aucun commentaire:

Enregistrer un commentaire