Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Comparing an array to a DBI table

by TheoPetersen (Priest)
on Jul 18, 2001 at 17:16 UTC ( #97638=note: print w/ replies, xml ) Need Help??


in reply to Comparing an array to a DBI table

Matching 50,000 anything against a database is going to be a pain. I would do one select though, draw the whole table into a hash of ids, then compare your array to it. This trades off memory for disk and CPU time; for this much data it is probably worth it, but not a good idea when the table contains millions of records.

Any faster scheme would depend on properties of the table; for instance, if the user ids are integers and have longish sequences of values with no gaps, then you could store the start and end of sequences and so on.


Comment on Re: Comparing an array to a DBI table

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (14)
As of 2014-09-02 09:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (21 votes), past polls