in reply to How do I improve the effeciency of my script

If you really have a lot of such strings, loading them all in a hash will cause you to run out of core memory - swapping isn't quite the powerbeast either.

But if I look at your queries, you seem to do three selects, and use the results purely to populate a different database. This smells like no data needs to make the roundtrip; can't you just make a single insert statement that looks up values from the different tables? Possibly using a stored procedure?

  • Comment on Re: How do I improve the effeciency of my script