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: "William Bell" <william dot m dot bell at gmail dot com>
Subject: Re: Is there a performance advantage to using placeholders with Sybase?
Date: Jan 8 2008 5:03AM

Hi Steve....

CT-Library has the ability to support dynamic sql (both the  'execute
immediate' and  'prepared' statements) via ct_dynamic (See Chapter 8 of the
Open Client Reference Manual). If you were to use place holders you would
prepare the statement once at startup so you would incur the cost of parsing
and optimizing the SQL once... the caveat being that each instance of the
program would compile the sql each time it is run - which is cheaper than
continuously running 'execute immediate'....

To really optimize performance you may want to look at stored procedures and
RPC calls - this would reduce the overhead even further, but is not always
an option

Bill Bell
Principal Consultant, Sybase Professional Services



On 1/7/08, Wechsler, Steven  wrote:
>
>  DBI documentation says that you're better off using placeholders rather
> than continully preparing and executing, or using $dbh->do(). Does this hold
> true with Sybase?
>
> Steve Wechsler | steven.wechsler@mtvstaff.com
> Sybase/SQL Server/MySQL Database Administrator
> 212-846-5683
>
> MTV Networks****
>
>
>