Slow Left Join on 100K row tables
Posted by: Biju Philips
Date: March 09, 2022 08:58PM

I have an issue with Left Join being extremely slow between two tables with 100K rows each. I am tracking changes use MD5 hash keys. Each table has only 2 fields the key (GUID) and the HashKey. Inner Join and Left Join from b to a is working but Left Join from a to b is not working. Both tables have index on the Key field. What else can I do to get this to work? This is part of a large replication project I am working on so should be something I can automate on all tables in the database. Below is the query MySQL used.

select count(1)
From Table1 a
Left Join Table2 b
On a.Id = b.Id
Where b.Id Is Null;

Version: 5.7.36-39-log Innodb.

Thanks!

Options: ReplyQuote


Subject
Written By
Posted
Slow Left Join on 100K row tables
March 09, 2022 08:58PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.