00001 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
00002
00003 <html>
00004 <head>
00005 <title>ADODB Benchmarks</title>
00006 </head>
00007
00008 <body>
00009 <?php
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 $testmssql = true;
00022
00023 $testoracle = true;
00024 $testado = true;
00025 $testibase = true;
00026 $testaccess = true;
00027 $testmysql = true;
00028 $testsqlite = true;;
00029
00030 set_time_limit(240);
00031
00032 include("../tohtml.inc.php");
00033 include("../adodb.inc.php");
00034
00035 function testdb(&$db,$createtab="create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)")
00036 {
00037 GLOBAL $ADODB_version,$ADODB_FETCH_MODE;
00038
00039 adodb_backtrace();
00040
00041 $max = 100;
00042 $sql = 'select * from ADOXYZ';
00043 $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
00044
00045
00046
00047
00048 $rs = $db->Execute($sql);
00049 if (!$rs){
00050 print "Error in recordset<p>";
00051 return;
00052 }
00053 $arr = $rs->GetArray();
00054
00055 global $ADODB_COUNTRECS;
00056 $ADODB_COUNTRECS = false;
00057 $start = microtime();
00058 for ($i=0; $i < $max; $i++) {
00059 $rs =& $db->Execute($sql);
00060 $arr =& $rs->GetArray();
00061
00062 }
00063 $end = microtime();
00064 $start = explode(' ',$start);
00065 $end = explode(' ',$end);
00066
00067
00068
00069
00070
00071 $total = $end[0]+trim($end[1]) - $start[0]-trim($start[1]);
00072 printf ("<p>seconds = %8.2f for %d iterations each with %d records</p>",$total,$max, sizeof($arr));
00073 flush();
00074
00075
00076
00077 }
00078 include("testdatabases.inc.php");
00079
00080 ?>
00081
00082
00083 </body>
00084 </html>