Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: prepare statement within DBI

by dragonchild (Archbishop)
on Aug 25, 2004 at 15:23 UTC ( [id://385702]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://385702]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-26 01:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found