Up Prev Next
From: "Ed Avis" <eda at waniasset dot com>
Subject: RE: Is there a performance advantage to using placeholders with Sybase?
Date: Jan 8 2008 9:59AM
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.
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email