Forum OpenACS Q&A: Re: Ran out of database pools (pool2 pool3 pool1)
Thanks; our posts crossed in the ether. Luckily, this is a one-time only data processing script, and the performance doesn't matter to me. You are right that various separate queries could probably become joins, if that's what you're saying.
Also, it is not strictly necessary to hold a database handle open for smaller result sets; I could just grab the whole query result into a data structure and loop over that.