MySQL Forums :: Performance :: I'm looking for the best way to join two tables based on the matching of the words in a varchar field in one table against a varchar field on another table


Advanced Search

I'm looking for the best way to join two tables based on the matching of the words in a varchar field in one table against a varchar field on another table
Posted by: Edgardo Grinblat ()
Date: June 30, 2009 10:38AM

I have two tables with a description column in each one. The first table may have between 500,000 and 1,000,000 records, the second one may have between 1,000 and 10,000 records. I need to get the join of both tables based on the descriptions fields in each table but the problem is I should search the words in the descriptions fields in any order. For example "My house is red" should join with "Red is my house" or with "is red my house". So the words in the description field on the first table should be the same to the words in the description field on the second table without considering the order of those words.
I could create in both tables 7 or 8 varchar fields (the descriptions are never longer than 8 words) to store all the words from the descriptions fields of both tables if it could help.
How can I solve this with a good performance?

Options: ReplyQuote


Subject Views Written By Posted
I'm looking for the best way to join two tables based on the matching of the words in a varchar field in one table against a varchar field on another table 2948 Edgardo Grinblat 06/30/2009 10:38AM
Re: I'm looking for the best way to join two tables based on the matching of the words in a varchar field in one table against a varchar field on another table 1715 Rick James 07/01/2009 07:55PM
Re: I'm looking for the best way to join two tables based on the matching of the words in a varchar field in one table against a varchar field on another table 1622 Edgardo Grinblat 07/02/2009 06:38AM


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.