in reply to How can I improve the sql statements applying efficiency

This looks like a database issue - this has nothing to do with Perl.

You have to look at your database design (how many indices have to be updated for every row you delete or insert), how often do you commit in between (for every row, for every n rows - or only once?) etc etc.

Maybe you should also think about doing the processing not in one but in several parallel session, but all that depends on a lot of things you have told us nothing about...

  • Comment on Re: How can I improve the sql statements applying efficiency