Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Data store and threads

by Kirche (Sexton)
on Feb 11, 2010 at 16:36 UTC ( [id://822694]=note: print w/replies, xml ) Need Help??


in reply to Re: Data store and threads
in thread Data store and threads

Yes, 2M. I can't store all data in memory. Data is like:
412415
535236642
32523
I just need to check presence of certain digits in this db.

Replies are listed 'Best First'.
Re^3: Data store and threads
by BrowserUk (Patriarch) on Feb 11, 2010 at 18:52 UTC
    Yes, 2M. I can't store all data in memory.

    Why not? A hash containing 2 million keys takes around 65 MB of memory:

    undef $h{ 0+ int rand 2**32 } for 1 .. 2e6;; print scalar keys %h;; 1999519 print total_size \%h;; 67353411
    assuming that i need to write/search through this data rapidly from several threads

    Can you say a little more about what you are doing with this data?

    What would you be writing to it?

    Do changes need to persist beyond the life of the program?

    How many threads?

    How rapidly?

    I just need to check presence of certain digits in this db.

    Do you mean numbers rather than "digits"?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-18 05:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found