|
|
sybperl-l Archive
Up Prev Next
From: "Wechsler, Steven" <Steven dot Wechsler at mtvstaff dot com>
Subject: RE: Is there a performance advantage to using placeholders with Sybase?
Date: Jan 8 2008 2:28AM
But does Sybase actually have the API functionality to prepare a SQL
statement and then insert the parameters? I seem to recall reading
somewhere that even though DBI supports it, behind the scenes CT-Library
actually has to resend the entire command each time execute() is
called...
________________________________
From: todd.e.rinaldo@jpmorgan.com [mailto:todd.e.rinaldo@jpmorgan.com]
Sent: Monday, January 07, 2008 6:16 PM
To: Wechsler, Steven; sybperl-l@peppler.org
Subject: RE: Is there a performance advantage to using placeholders with
Sybase?
I would say yes. Sybase has to prepare the query (compile) every time
you run a prepare. If you only 1 run prepare, then you're having to deal
with query time only. This should be more efficient. I've been told
there's a risk of some sort of funky tempdb usage based on the contents
of the prepare when place holders are involved, but I've really never
noticed an issue.
P.S. If you're looking to optimize, then another thing you should look
at is prepare_cached.
________________________________
From: owner-sybperl-l@peppler.org [mailto:owner-sybperl-l@peppler.org]
On Behalf Of Wechsler, Steven
Sent: Monday, January 07, 2008 4:25 PM
To: sybperl-l@peppler.org
Subject: Is there a performance advantage to using placeholders with
Sybase?
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
|