News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Gonzalo Ayuso's Blog:
Performance analysis of Stored Procedures with PDO and PHP
May 03, 2011 @ 08:38:32

Gonzalo Ayuso has posted the results of some testing he's done in using stored procedures in a PHP application. He compares the run time of two different scripts, one using prepared statements and one without, to see which would perform better in the long run.

Last week I had an interesting conversation on twitter about the usage of stored procedures in databases. Someone told stored procedure are evil. I'm not agree with that. Stored procedures are a great place to store business logic. In this post I'm going to test the performance of a small piece of code using stored procedures and using only PHP code.

In the end, the results showed that the stored procedures method was actually faster and used a bit less memory than the normal "plain PHP" method. It can be a bit more difficult to use than just a SQL statement in a string (properly escaped, of course) but can be worth the extra hassle when you need that performance boost.

0 comments voice your opinion now!
performance stored procedures pdo benchmark


blog comments powered by Disqus

Similar Posts

ThinkPHP Blog: Webapplikationen mit PHP5 und IBM DB2

Johannes Schluter's Blog: PHP 5.3: Up to 30% performance win

PHPClasses.org: Lately in PHP, Episode 26 - Accelerating PHP 5.4 with updated PHP cache extensions

Kevin Schroeder: Why is FastCGI /w Nginx so much faster than Apache /w mod_php?

PHPImpact Blog: Zend Framework Controller: 22% Drop in Responsiveness


Community Events

Don't see your event here?
Let us know!


yii2 symfony part2 project api composer introduction php7 application interview example opinion language community series framework configure list podcast laravel

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework