in reply to Help on selecting and deleting many records in a DB.
Doing the work in the database is almost always faster. Did you try running postgresql's EXPLAIN on your query?
Do you have enough indexes on your table?
In Section
Seekers of Perl Wisdom