Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: perl mysql full table scan

by moritz (Cardinal)
on Jul 10, 2013 at 08:04 UTC ( #1043421=note: print w/replies, xml ) Need Help??

in reply to perl mysql full table scan

Doing it in mysql will be more efficient, because if you do it in perl, all the data has to be serialized in mysql, transferred to perl, then deserialized, and finally the matching happens.

In the other scenario, mysql only needs to transfer the matched rows to perl, so all in all there is less to do.

Finally you should consider that maybe in future an index will be added in mysql, and then it will be used automatically. If you do the scan in perl, you won't profit form the index.

The rule of thumb is to let the database do what it's good at, and only do the rest in perl.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1043421]
[jedikaiti]: Hi Monks
[GrandFather]: HI jedikaiti. Collected more 73p data this morning. Rubbish sky though. Seeing was between 5 and 9 arc seconds FWHM with thin cloud drifting through :(
[GrandFather]: Still, at least some of the images are good enough to get reasonable astrometry. Well, good enough for a good plate solve anyway

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (10)
As of 2017-02-20 20:50 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (302 votes). Check out past polls.