> Oh, and don't forget to create an index on (fn, ln) for both tables. Sorry for being out of touch lately. I had to table this issue to make progress on a different work-related project. Anyway, I spent some time reading up on indexes. Just by adding the (ln, fn) index to both tables (contacts and import_contacts), my query went from an 18-21 second execution time to a 9-10 second execution time, but not consistently. I ran the query again a few minutes later and it took 18 seconds still. I tried again 10-15 minutes later and the execution time went back down to 11 seconds. Not sure what's happening here exactly.
> Sounds about right, except for the difference in number of dupes. How many > are there in total? Using my method of finding duplicates, I'm counting 14 matches. However, when I looked again at b logica's query, I'm really getting 16 matches and not 24. Here's why: Even though 24 records are returned, some of them are duplicate names due to record redundancy (a separate issue related to how the data is managed by my client). For instance, the name "Joe Rohan" appears 3 times simply because this name exists 3 times in the contacts table as individual records (there are 3 Joe Rohan's in the contacts table, I mean). The only confusing thing is that some names appear more than once in b logica's result set but they are displaying the same "contact.id" value. For example, the contact with the name "Kami Dolney" appears twice in the result set, but each record is showing the same primary key ID. So Kami Dolney does not exist twice in the contacts table. I'm not sure why this contact is appearing twice in the query's result set. Even more confounding is the fact that this contact (Kami Dolney) does NOT even appear at all as a duplicate using my method of finding dupes (along with a couple other names). In other words, b logica's query seems to be returning an accurate result set of matching contact names from both tables. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
