NOTICE:
This content is in the "archives" of a retired blog called Gadgetopia. It has been moved to this subdomain as it is no longer considered relevant to the site. It is being hosted here for a indeterminate period of time. Its existence at this URL is not guaranteed, and it may be removed at any time. If you would like to refer to this content in the future, you are encouraged to save it to your local file system.

Some content from Gadgetopia was moved to the technical blog on deanebarker.net

The Price of PHP Database Abstraction

Originally published by "dbarker" on 2006-04-07 16:47:00Z

PHP Database Functions vs. PEAR::DB vs. ADOdb (and PDO): Joseph Scott does some testing to remind us that while database abstraction layers are nice, there is a performance price to be paid – sometimes an expensive one.

If you need performance over supporting multiple databases and use of PEAR packages that require PEAR::DB (like PEAR::DB_DataObject) then stick with calling the database functions directly. No way to beat that from a performance perspective.

Joseph, how about trying the ADODB PHP extension? According to them:

[It] provides up to 100% speedup by replacing parts of ADOdb with C code. ADOdb will auto-detect if this extension is installed and use it automatically.

Comment by "Joseph Scott" on 2006-04-10 09:27:00Z
I hope to try out the ADOdb extension sometime this week with this same test. Stay tuned.