in reply to prepare statement within DBI

The cost of preparing the statement, while non-zero, usually is effectively zero when compared with the cost of executing the statement.

Additionally, there is the cost of maintaining the code. One prepare() call has traditionally been used for preparing one statement. Breaking that could cause issues when someone else tries to maintain your code.

As always, I would suggest trying it out and seeing what happens. The results might surprise us all.

Caveat - as with every non-vanilla usage of DBI, this is going to be dependent on the specific RDBMS you're going to be using. You have been warned.

------
We are the carpenters and bricklayers of the Information Age.

Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

I shouldn't have to say this, but any code, unless otherwise stated, is untested