in reply to Re: prepare statement within DBI
in thread prepare statement within DBI

Additionally, consider looking at the results of your database's query optimizer and analyzer to see what the trade-off will be in creating more complex SQL queries to offset the cost on the perl side in making multiple calls.

Maybe a stored proc is in order?

Thoughts,
-v
"Perl. There is no substitute."