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 reply to Re: Help on selecting and deleting many records in a DB.
by RichardK
in thread Help on selecting and deleting many records in a DB.
by neilwatson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |