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
From: firstname.lastname@example.org [mailto:email@example.com]
Sent: Monday, January 07, 2008 6:16 PM
To: Wechsler, Steven; firstname.lastname@example.org
Subject: RE: Is there a performance advantage to using placeholders with
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: email@example.com [mailto:firstname.lastname@example.org]
On Behalf Of Wechsler, Steven
Sent: Monday, January 07, 2008 4:25 PM
Subject: Is there a performance advantage to using placeholders with
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@example.com
Sybase/SQL Server/MySQL Database Administrator