Welcome to WebmasterWorld Guest from 220.127.116.11 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Become a Pro Member
How to find related items in a no so similar list? queries, match, mysql redhatlab
Hi, I have a question about searching in MySQL: I have a table with 1.5+ million records in only one field plus the auto increment field. The records might seem similar some times, but some others they are not what kind of query I can run to try to find similar items? Note: I was thinking about LIKE queries or FULL TEXT, but after testing them I found out they are not good. Thank you
what kind of query I can run to try to find similar items? What aspects of the records make them "similar?" Items that are the same color, size, or other attributes? Some part of the actual record that is similar? Mnemonic similarities, like "here" and "hear" or "to","two," and "too"? (I've always wished for a project in which I could use soundex(). :-) LifeinAsia
Can you post some examples of what makes the data "similar" to others?
I was thinking about LIKE queries or FULL TEXT, but after testing them I found out they are not good. What made them "not good?" redhatlab
Hi, Sorry for the long delay here is a sample: FIP2XM8S FIP30M20 FIP32A11X FIP32B18Y FIP3AM12 FIP3AM23 FIP3BM13D FIP3BM14 FIP3BM22 FIP3BM23 I have been thinking in using PHP to cut the strings and get i.e. the first 3 letters or the last 3 and then run the query. LifeinAsia
Well, the following would work: SELECT * FROM MyTable WHERE MyField LIKE 'FIP%' As long as you have an index on MyField, it should run pretty quickly. If not, then you probably have other more serious problems and you should do further investigation into what's going on with your server (especially if it is shared with other users).