Performance gain when not using prepared statements?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 17 June 2011 04:50:00 Daevid Vincent wrote:
> > I've seen too many people over the years try and rally against common
> > sense practices like using prepared statements for perhaps a marginal
> > gain of performance on one page while their load averages are 0,0,0.
>
> Agreed. The ONLY time prepared statements are useful, is in a loop where
> you're changing a few variables but within the same SQL statement. That is
> a rare case for most people.
>

Not ONLY. I love prepared statements because with them I can store arbitrary 
strings in DB without need to worry about fancy escaping and SQL injection. 
And do it in DB-independent way.
Think about all that extra escaping and performance gain of not using prepared 
statement will shrink a lot ) Don't have actual numbers though.

-- 
Vitalii

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux