Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Connect to Oracle with Perl is just very slow.

430895Nov 21 2004 — edited Nov 24 2004
Hi all,

I have install Oracle 10g for Windows as my DB engine, and use IIS 6.0 and ActivePerl 5.8.4 for my web application running environment. I find that the time taken for establishing database connection is too long (5 seconds in average, the worst case is about 8 seconds). I check this with the following testing script:

use CGI qw/:standard/;
use CGI::Carp qw(fatalsToBrowser);
use Win32::ODBC;

$ENV{'PATH'} = "C:\\Perl\\bin;E:\\Oracle\\product\\10.1.0\\Db_1\\BIN;" . $ENV{'PATH'};

print "Content-type: text/html\n\n";
print "<html><head></head><body>";

my ($sec,$min,$hour,$mday,$mon,$year,$wday,$ydat,$isdst) = localtime();
print "Start: $hour:$min:$sec <br>";

if (!($db = new Win32::ODBC("dsn=abc;UID=user;PWD=pass"))){
print "Unable to connect to database:<BR>";
print Win32::ODBC::Error() . "<br>";
print end_html;
exit;
}
$db->Connection;

($sec,$min,$hour,$mday,$mon,$year,$wday,$ydat,$isdst) = localtime();
print "End: $hour:$min:$sec <br>";
$db->Close();

print "</body></html>";

Does anyone give me some hints to improve the performance for database connection? Thanks in advance.

Athens Yan.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 22 2004
Added on Nov 21 2004
9 comments
810 views