Hey all.
I've read lots of docs on how much faster mysqli is than mysql. I've also read about how using mysqli in OO mode is much faster than using PEAR:B. So I ran a test of my own with an app that I'm building now.
For background purposes, my PHP application (running PHP 5.0.4) is taking in text files and processing the contents into a MySQL 4.1 db. Some of these files are small 16K and result in a 70 or so records. Some are large (1M and result in about 17K in db records. I'm running this app as a PHP CLI script.
Using mysqli I was able to cut out a lot of redundant code and utilize the chained queries feature using mysqli_multi_query() function. Both a PEAR:B and mysqli version of my app run. However, the mysqli version is WAY slower. My average speeds of the apps is:
PEAR:B (using mysqli) at 17seconds
mysqli OO at 55 seconds
So, one problem I was getting using mysqli OO was "Error: MySQL server has gone away". I fixed this by enabling the option in the PHP-CLI php.ini to mysqli.reconnect = On. I've also adjusted my my.cnf file to handle bigger datasets. So the file runs, but takes upto 53-54 seconds to run. I think this is due to a timeout and then reconnection. I can't see why PEAR:B would be faster than OO mysqli.
Suggestions? Thanks in advance!