At 11:11 AM 1/14/2008, Saravanan wrote:
Hi,
Server parses the statement only once and executes them with the small
difference. It reduces parsing time. Clients don't need to send the full
statement again and again. It reduces traffic.
Saravanan
Saravanan,
Thanks for your quick reply. In theory using parameters
seems like a good idea. But has anyone done any benchmarking to say it is
25% faster? 10% faster? Or is it slower because MySQL can't optimize the
query as well? Most people probably use parameters to prevent SQL
injection, but I'm not worried about that because there is no user input.
So have you (or anyone else) noticed a significant speed improvement using
parameters with MySQL 5?
TIA
Mike
--- On Mon, 1/14/08, mos <[EMAIL PROTECTED]> wrote:
> From: mos <[EMAIL PROTECTED]>
> Subject: Prepared SQL statements - Faster performance?
> To: mysql@lists.mysql.com
> Date: Monday, January 14, 2008, 11:17 PM
> I would like to speed up my Select queries since I'm
> executing approx 5,000
> of them, same syntax but the search values for 2 columns
> will change with
> each query. Will I see any performance increase if I
> prepare the statement
> and use parameters? (I don't need to use the query
> cache since the result
> set will be returned only once for each set of search
> values.)
>
> TIA
> Mike
> MySQL 5.024
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]