[Gena01 Logo]
November 10, 2024, 05:44:39 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Tags Login Register  
Pages: [1]
  Print  
Author Topic: My Pear DB fork.  (Read 70456 times)
0 Members and 1 Guest are viewing this topic.
Gena01
Administrator
Sr. Member
*****
Posts: 423



WWW
« on: January 07, 2009, 12:09:56 pm »

We use PEAR DB extensively in our code (for my day job) and switching over to another abstraction library is too much hassle at the moment. We are also still in the migration phase from PHP4 to PHP5. (Yes I know PHP4 is dead and PHP5 rocks) One of the challenges that we faced was the fact that Pear DB generates a ton of warnings when running in PHP5 and it's also pretty much obsolete/abandoned. Which is a good thing for me, since I don't need to worry about having to merge different trees. I am currently focusing my efforts on db.php and the pear db oci8 driver implementation. I also added some new code to speed up Pear DB a little.

A couple of items that were fixed already:
+ Added a PHP version check to reduce the warnings and call the right function for the right version of PHP (4 vs 5).
+ Added oci8 implementation functions for GetCol(), GetAll() and GetAssoc() which use the oci8 ocifetchstatement() function to fetch rows in batches. 1 function call vs 2* N rows. The difference is huge if you are fetching 200-300 rows.

Things still looking at:
- There's a default pre-fetch that was introduced and somehow it's set at 400? That seems quite large. PHP oci8 module actually sets it to 100 by default. It's also set every time before fetching the rows. I am still pondering if we need another default in Pear DB driver.

Gena01
Logged
Tags: PHP pear Oracle 
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines | Sitemap Valid XHTML 1.0! Valid CSS!