The Price of PHP Database Abstraction

By Deane Barker on April 7, 2006

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.

What Links Here


Comments are closed. If you have something you really want to say, email and we‘ll get it added for you.