News Feed
Sections




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

Stoyan Stefanov's Blog:
Performance tunning with PEARDB
January 17, 2007 @ 09:35:00

Stoyan Stefanov has posted some of his tips to his blog today. Specifically, they deal with the PEAR::DB class, demonstrating some of the optimization of the package he's discovered in his coding experience.

If you use PEAR::MDB2, you can set a custom debug handler and collect all the queries you execute for debugging and performance tunning purposes, as shown before. But what if you're using PEAR::DB? Well, since PEAR::DB doesn't allow you such a functionality out of the box, you can hack it a bit to get similar results.

He creates a simple app to help with the illustration - a number of select queries to grab zipcode information from the database. As it stands, the PEAR::DB package doesn't handle the debugging well, so he adds in a few more lines to buffer the connection and some reporting code to check the resulting output (as well as some of his sample reports).

0 comments voice your opinion now!
pear package peardb performance tuning buffer connection reporting pear package peardb performance tuning buffer connection reporting


blog comments powered by Disqus

Similar Posts

Felix Geisendorfer's Blog: Enforce utf8 for multiple db connections

Matthew Weir O'Phinney's Blog: File_Fortune refactored

Chris Jones' Blog: PHP OCI8 and Oracle 11g DRCP Connection Pooling in Pictures

Ian Selby's Blog: Put Your PHP App on Steroids - Optimizing with APC Cache

Christopher Jones' Blog: Highly Scalable Connection Pooling in PHP


Community Events

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


performance php7 part2 community series introduction podcast voicesoftheelephpant api interview example application opinion laravel language symfony2 framework release configure conference

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