Steffan,

Try measuring the time it takes to connect with SqlPlus by using "Time::HiRes" with the variables $time1 and $time2 both set to gettimeofday() and the the length of time set to $time2-$time1, as follows:

$time1=gettimeofday();
your code runs here;
$time2=gettimeofday();
print $time2-$time1;

Paul


Paul Appleby wrote:

 I have a simple Perl 5.6 test script that uses DBI and DBD::Oracle to
 connect to a local Oracle 9i database
[...]
Why is the connection time so long and how can I shorten it?
[...]
It takes 2.9342188835144 seconds to connect to the database.

How long does it take with sqlplus? E.g. on our W2K 1193 MHz server (Oracle 8.1.7.2.1):

  timethis "echo exit | sqlplus -s /"

  TimeThis :  Command Line :  echo exit | sqlplus -s /
  TimeThis :    Start Time :  Mon Oct 18 10:17:15 2004

  TimeThis :  Command Line :  echo exit | sqlplus -s /
  TimeThis :    Start Time :  Mon Oct 18 10:17:15 2004
  TimeThis :      End Time :  Mon Oct 18 10:17:15 2004
  TimeThis :  Elapsed Time :  00:00:00.109


Steffen


--
Sincerely,

Paul Appleby

Reply via email to