Re: PEAR DB - performance
| From: | Lukas Smith | Date: | Tue, 30 Mar 2004 09:01:13 +0000 |
| Subject: | Re: PEAR DB - performance | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-26874@lists.php.net to get a copy of this message | ||
Bojan Mihelac wrote:
I noticed very poor performances of DB package, after doing some research on web i found one benchmark which stated that DB is slower than native mysql calls 150%. As DB package has great design and features (especially unique sequences on database level) I spent last two days trying to find some solution to avoid going back and programming without abstraction class.You are probably referring to the ADODB benchmark? This one is pretty far from reality as it pretty much only consists of a large number of fetches.
I am suspicious that one of the bottleneck could be DB_Result and fetching row's from another class (DB_mysql in my case), so I made a test where I created subclass of DB_mysql with folowing these methods: - fQuery, fExecute (same as query, execute, except it returns mysql resource instead of reference to a DB_Result object) - fetchRow (which is now in subclass of DB_common instead in DB_Result) - getAll, getOne, getRow (all functions calls fQuery or fExecute)http://marc.theaimsgroup.com/?l=pear-dev&m=100793507904834&w=2 regards, Lukas Smith smith@backendmedia.com _______________________________ BackendMedia www.backendmedia.com berlin@backendmedia.com Linn Zwoch Smith GbR Pariser Str. 44 D-10707 Berlin Tel +49 30 83 22 50 00 Fax +49 30 83 22 50 07