FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » An extremely large hash lookup mechanism
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
An extremely large hash lookup mechanism [message #172232] Mon, 07 February 2011 12:06 Go to previous message
ram is currently offline  ram
Messages: 4
Registered: February 2011
Karma:
Junior Member
I have Mysql table with customerid (big int) & customer_unique_key
(varchar )

I have a php script that needs to upload customers into groups.
The customer_unique_key will be uploaded and all the customerids
should be entered to a new table.

Initially My script was doing a per-record query to extract
customerid and print.
But this turned out to be toooo slow , since the upload file may have
upto a million records.

Now I modified the script to read all customer_unique_key ->
customerid as key value pairs into an array
This works fine and fast , but hogs the memory and crashes whenever
the number of records crosses around 3-4 million.


What is the best way I can implement a hash lookup ? Should I use a
CDB library ?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: String Replacement
Next Topic: mail function and wordwrap
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 09:22:16 GMT 2024

Total time taken to generate the page: 0.04232 seconds