Martin Lucas-Smith <mvl22@cam.ac.uk> wrote in message
news:<Pine.SOL.4.44.0308291546440.17650-100000@green.csi.cam.ac.uk>...
>
> I'm currently wanting to add database abstraction to my application (as a
> configurable option), which currently uses native MySQL calls. As far as I
> can see, there are three main layers available, with different pros/cons:
> PEAR, ADODB, dbx.
According to tests run by folks from PHPlens, use of popular
abstraction layers results in performance penalties as follows:

ADOdbext 14%
dbx 20% (index only)
ADOdb 27%
dbx 34% (index/assoc/info)
PhpLib 40%
MDB 54%
PEAR DB 152% (fetchInto)
PEAR DB 176% (fetchRow)
Metabase 296% (numeric cols)
Metabase 318% (assoc cols)

Source: [url]http://phplens.com/lens/adodb/[/url]

In addition, use of abstraction layers often robs you of opportunity
to use each database engines strengths and minimize dependency on
its weaknesses. All in all, I tend to agree with Yahoo!'s Michael
Radwin, who advises to "use abstraction sparingly".

Obviously, if your application uses databases lightly, the above can
be safely ignored as irrelevant.

Cheers,
NC