I got some interesting results with this benchmark that I'd like some
help interpreting.  This test is on a Windoze XP box comparing:

   ora_odbc_driver (Oracle supplied(?) ODBC driver)
   ms_odbc_driver  (Microsoft supplied ODBC driver)
   ora_dbd_driver   (DBD::Oracle)

Here is my test script:

-----------------------------
#!C:\Perl\bin

use strict;
use DBI;
use Benchmark qw(timethese cmpthese timeit countit timestr);

sub connect_dbd_oracle {
   my $dbh = DBI->connect('dbi:Oracle:host=myhost;sid=mysid',
                          'myuser',
                          'mypassword',
                          { RaiseError => 1, PrintError => 1 }
   ) || die "Can't connect with DBD-Oracle: $dbi::errstr";
}
my $ora_dbd_subref = \&connect_dbd_oracle;

sub connect_oracle_ouihome {
   my $dbh = DBI->connect('dbi:ODBC:system_oracle_mysid',
                          'myuser',
                          'mypassword',
                          { RaiseError => 1, PrintError => 1 }
   ) || die "Can't connect: $dbi::errstr";
}
my $ora_odbc_subref = \&connect_oracle_ouihome;

sub connect_oracle_msodbc {
   my $dbh = DBI->connect('dbi:ODBC:system_msodbc_oracle_mysid',
                          'myuser',
                          'mypassword',
                          { RaiseError => 1, PrintError => 1 }
   ) || die "Can't connect: $dbi::errstr";
}
my $ms_odbc_subref = \&connect_oracle_msodbc;

timethese 100, {
   'ora_dbd_driver'  => $ora_dbd_subref,
   'ora_odbc_driver' => $ora_odbc_subref,
   'ms_odbc_driver'  => $ms_odbc_subref,
};

cmpthese 100, {
   'ora_dbd_driver'  => $ora_dbd_subref,
   'ora_odbc_driver' => $ora_odbc_subref,
   'ms_odbc_driver'  => $ms_odbc_subref,
};

--------------------------------------------------------------------

Here are the results:

Benchmark: timing 100 iterations of ms_odbc_driver, ora_dbd_driver,
ora_odbc_dri
ver...
ms_odbc_driver: 35 wallclock secs ( 2.15 usr +  4.05 sys =  6.21 CPU) @
16.11/s
(n=100)
ora_dbd_driver: 124 wallclock secs ( 1.44 usr +  2.89 sys =  4.34 CPU)
@ 23.06/s
 (n=100)
ora_odbc_driver: 262 wallclock secs ( 3.46 usr +  4.91 sys =  8.37 CPU)
@ 11.94/
s (n=100)
                  Rate ora_odbc_driver  ms_odbc_driver  ora_dbd_driver
ora_odbc_driver 11.9/s              --            -27%            -48%
ms_odbc_driver  16.3/s             37%              --            -29%
ora_dbd_driver  22.8/s             92%             40%              --

-----------------------------------

Ok I'm having a brain-fart - can someone clue me in as to how to read
this last section that compares the different methods using percentages?
 Is the 1st column saying that ms_odbc_driver is 37% faster than the
ora_odbc_driver, and the ora_dbd_driver(DBD::Oracle) is 92% faster than
the ora_odbc_driver??  The last 2 columns have me confused too.  Any
help is appreciated.

Thanks.

Hardy Merrill

Reply via email to