I threw together the following little benchmark in order to get some numbers on
DBD::ODBC peroformance, which is just what I'm working with. I'm running both server and client on a PIII 500 PC with 128 MB of RAM, IDE hard drive, NT Server 4.0 and MSSQL 7.0. No optimization or tunning whatsoever. I would say this numbers are close to the minimum you could expect from a similar system. Performance aside I'd reccommend DBD::ODBC for maximum portability. I would also because I didn't have any problems installing it and it has behaved exactly as expected during development.
#!/usr/bin/perl -w
use strict;
use DBI;
my $dbh;
my $time = time;
for(1..999) {
$dbh = DBI->connect('DBI:ODBC:sqlkranon', 'sa', '') || die $dbh->err
+str;
$dbh->disconnect;
}
$dbh = DBI->connect('DBI:ODBC:sqlkranon', 'sa', '') || die $dbh->errst
+r;
print "1000 connects in ", time - $time, " seconds\n";
$time = time;
my $rows;
for(1..10000) {
my $sth = $dbh->prepare("select CveAsegSeguro,CveSeguro from C_Asegu
+radorasSeguros");
$sth->execute();
while (my @row = $sth->fetchrow_array ) {
$rows++;
}
}
$dbh->disconnect;
print "10000 selects fetching $rows rows in ", time - $time, " seconds
+\n";
__END__
Results:
1000 connects in 15 seconds
10000 selects fetching 30000 rows in 17 seconds
Good luck!
Brother Greg
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.