Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Think about Loose Coupling
 
PerlMonks  

DBI prepare_cached

by hok_si_la (Curate)
on Sep 08, 2005 at 17:08 UTC ( [id://490323]=perlquestion: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.

hok_si_la has asked for the wisdom of the Perl Monks concerning the following question:

Greetings Monks,

I use use DBI to execute my MS SQL server statements. I recently read Here that the method prepare_cached stores the statement handle in a hash associated with $dbh. What is the scope of that hash? Is it useless to use prepare_cached when a statement handle is not executed more than once within a given subroutine?

Thanks for your help
hok_si_la

Replies are listed 'Best First'.
Re: DBI prepare_cached
by runrig (Abbot) on Sep 08, 2005 at 17:23 UTC
    What is the scope of that hash? Is it useless to use prepare_cached when a statement handle is not executed more than once within a given subroutine?
    The same as the $dbh. If a given statement is only executed prepared once on the same database handle, then prepared_cached is useless.
      runrig,

      Thanks for the quick response.

      hok_si_la
      I so mis-read that reply. Never mind.

      Ivan Heffner
      Sr. Software Engineer, DAS Lead
      WhitePages.com, Inc.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://490323]
Approved by gam3
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.