RE: Is there a performance advantage to using placeholders with Sybase?

"Ed Avis" <[email protected]> Tue, 8 Jan 2008 09:59:19 -0000
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase
Message-ID <[email protected]>
Michael Peppler wrote:

>Yes, OpenClient has an API that creates a "prepared" statement 
>(actually known as a light-weight stored procedure) for you, 

Suppose the query you want to prepare is itself to run a stored procedure.

    exec my_proc ?, ?, ?

Is there any performance advantage to using a prepared statement here?

With DBD::Sybase, does execute_array() have any performance advantage over calling execute() repeatedly?

>Another limitation is that placeholders can only be used for 
>single statement SQL batches (i.e. a single 
>SELECT/INSERT/UPDATE/DELETE statement). You can't use 
>placeholders if you want to submit a statement that includes 
>other T-SQL code (flow control, conditionals, while loops, etc). 

Hmm, couldn't DBD::Sybase work around this with a 'fake placeholders' feature?  I think some other DBDs have that because their DBMSes don't support placeholders at all.

-- 
Ed Avis <[email protected]> 

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________