User Contributed Notes 5 notes

The above benchmark is very misleading. Unfortunately, I found out the hard way by porting my app to ADODB. Most PHP apps are going to be very short-lived therefore startup / setup time is a large factor. This benchmark does not measure that. Just include()ing the main ADODB file added 27ms to my app's startup time! Considering my app took only 16ms to run in total using DBX, the idea of switching to ADODB was DOA before running a single query.

In the end, the total time for my app went from 16ms with DBX to 49ms with ADODB. ADODB's powerful features are obviously not worth that kind of overhead.

Would like to confirm that dbx is at least three times faster than adodb with my application. However, once loaded, adodb has much more features and probably performs better in some situations then dbx.

One of the nice features that adodb has, is the way you can quickly make a dropdown menu from a query. Here's a similar function that works with a dbx result object:

<?php

// $result is the dbx_query result (It expects two fields)// $name is the name of the dropdown field// $selected is the option that should be selected// $firstrow takes a string like "myvalue:myname"// $attr can be used to add some extra attributes