PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

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.

-- 
Ed Avis  

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