Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: $sth->prepare_cached loop

by tilly (Archbishop)
on Mar 08, 2011 at 07:17 UTC ( #891960=note: print w/ replies, xml ) Need Help??


in reply to $sth->prepare_cached loop

What will happen will vary depending on the database.

With Oracle, you will prepare the query once. And then send 3 execute statements to it. Which saves you the effort of compiling the query. Since compilation is expensive in Oracle, this is a win.

In MySQL the caching is done client side. So you wind up preparing and executing the query 3 times. Since MySQL makes preparing the query cheap, this doesn't cost very much.


Comment on Re: $sth->prepare_cached loop
Replies are listed 'Best First'.
Re^2: $sth->prepare_cached loop
by hmadhi (Acolyte) on Mar 08, 2011 at 08:02 UTC
    Thanks for the reply, I am using Oracle.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (12)
As of 2015-07-30 15:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (272 votes), past polls