Skip to content

Instantly share code, notes, and snippets.

@tony-landis
Created December 3, 2008 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tony-landis/31483 to your computer and use it in GitHub Desktop.
Save tony-landis/31483 to your computer and use it in GitHub Desktop.
Quick and dirty PDO vs ADOdb benchmark
<?php
#Quick and dirty PDO vs ADOdb benchmark
#PDO benchmark script:
$db = new PDO("mysql:dbname=logs;host=127.0.0.1", "root", "");
$rs = $db->query("select * from ses limit 10")->fetchAll(PDO::FETCH_ASSOC);
foreach($rs as $r) {}
#ADOdb benchmark script
require_once("adodb5/adodb.inc.php");
$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
$db = NewADOConnection("mysql://root:@127.0.0.1/logs");
$rs = $db->Execute("select * from ses limit 10");
foreach($rs as $r) {}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment