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

"William Bell" <[email protected]> Tue, 8 Jan 2008 00:03:37 -0500
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase
Message-ID <[email protected]>
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 <[email protected]> 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 | [email protected]
> Sybase/SQL Server/MySQL Database Administrator
> 212-846-5683
>
> MTV Networks****
>
>
>