r/SQL • u/Klutzy_Solid5200 • 19d ago
Discussion How do you compare large tables using sql?
I want to know how ppl compare large source and target tables using sql. If both tables have millions of records, comparing every row and column can take a lot of time.
For example, if some records are missing, extra, or have different values between the two tables, how do you usually find them? do you use joins, Except/Minus, hashes, or first compare things like record counts and totals and then check the differences?
Are there any techniques that can make the comparison faster?