Performace matters of PEAR DB
| From: | Roalt Zijlstra | Date: | Mon, 04 Aug 2003 14:54:11 +0000 |
| Subject: | Performace matters of PEAR DB | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-19258@lists.php.net to get a copy of this message | ||
Hello PEAR developers,
I started using the PEAR database layer for my web-based calendaring application PBCS
(www.pbcs.org). And fromthe start I already build a DB independen database layer in my code. After
a while of looking around for existing DB-layers I chose to use PEAR so people with ither
databases then MySQL can use the application.
Actually I have no problems with PEAR at all, cos it is all working wel and the Sequence emulation
for MySQL is working well too. I had to rewrite some code to use the get_key() method instead of
determining the inserted ID after the INSERT as the PHP mysql_ layer is able to do.
Once implemented I noticed a remarkable drop in speed while using the new PEAR layer. To compare
PEAR to my old database layer which accessed a MySQL database direct I wrote a get_ket() function
which actually does a MAX count of the id rows on my tables.
Now you would think that the difference would not be so great but the PEAR code was nearly three
times as slow as my own database code. This result was a little shocking to me, but I'd like to
know of there are plausible reasons for this apart from the O.O. implementation. Furthermore I
wuold like to know if there were/are speedups in the PEAR database code after the PHP 4.3.2
release.
I hope anybody can enlighten me on this as I do want to use PEAR to be database independent, but
for heavy traffic sites using PEAR in combination with MySQL would be bad performance wise.
Anybody Ideas?
Thanks for the software and keep up the good work (as it actaully works well).
Roalt Zijlstra
--
Project-Based Calendar System
http://www.pbcs.org
roalt@pbcs.org
roalt@kwenie.org
zijlstra@stone-it.com (Work)