MySQL Forums
Forum List  »  Optimizer & Parser

Comparing two columns on big table
Posted by: Krzysztof Wróblewski
Date: March 21, 2019 03:24PM

I would like to get advice about method of comparing two columns.
I have very big tables (more than 10 million rows) with multiple columns.
I thought it will be easier to concat all columns in one string and create temporary tables with only 2 columns: ids and these strings.

So I have 2 tables, 'old' and 'new' with columns: 'id', 'con'.

I would like to know list of 'id' from 'new' column where new.con doesn't have exactly match with old.con.

Strings have about 1024 characters.

Would you like to advise most eficient way? I can set these tables as I need, also I can use any query.

I think also about creation md5sum of 'con' and compare only shorter hash, but I'm afraid that for so many million rows hash will be repeated somewhere.
I don't know if I'm going right way.


Options: ReplyQuote

Written By
Comparing two columns on big table
March 21, 2019 03:24PM

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.