in reply to How do I improve the effeciency of my script
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?
|
|---|