#!/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->errstr; $dbh->disconnect; } $dbh = DBI->connect('DBI:ODBC:sqlkranon', 'sa', '') || die $dbh->errstr; print "1000 connects in ", time - $time, " seconds\n"; $time = time; my $rows; for(1..10000) { my $sth = $dbh->prepare("select CveAsegSeguro,CveSeguro from C_AseguradorasSeguros"); $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