Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: mysql's join too slow; using Perl to compare two tables

by Andre_br (Pilgrim)
on Feb 05, 2006 at 20:36 UTC ( [id://528096]=note: print w/replies, xml ) Need Help??


in reply to Re: mysql's join too slow; using Perl to compare two tables
in thread mysql's join too slow; using Perl to compare two tables

Ok! I've implemented the indexes and things are now warp speed! Mysql is great, I was the one screwing up... lghs. Also because I was imposing a conversion to binary of all the fields, to make sure the different cases werenīt ignored when comparing similar records:

select pivot.received_id from catalog inner join pivot on ( binary catalog.author = binary pivot.author and binary catalog.titulo = binary pivot.titulo and binary catalog.label = binary pivot.label and binary catalog.description = binary pivot.description and binary catalog.price = binary pivot.price );

Iīve put the indexes and things didnīt get any better. Then I decided to get less perfectionist, and took away all the binaries... ok, mysql, no problem, ths isnīt really thaaaat necesary for me. Well, then the join that was taking 3 minutes, surprised me with the output screen in, guess what, 1 second!

Thanks for all the inputs, my fellow coders.And sorry for not having mentioned this 'binary' issue, as I thought it might not be it. But as you directed me to the only one thing that could explain the slowness, and it didnīt solve it, I could start suspecting about the binary.

Take care

Andre

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://528096]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-04-23 10:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found