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
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
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 | firstname.lastname@example.org
> Sybase/SQL Server/MySQL Database Administrator
> MTV Networks****