Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Help! JDBC / Oracle 8.05 connections open VERY SLOW

Help! JDBC / Oracle 8.05 connections open VERY SLOW

From: CaboDog <cabodog_at_home.com>
Date: Fri, 26 Nov 1999 00:16:22 GMT
Message-ID: <qjk%3.30173$zd.336145@news1.alsv1.occa.home.com>


I am totally befuddled. The details: I am simply trying to open 10 connections in a single thread to an Oracle 8.05 database, for the purposes of building a connection pool. I am running the latest JDK1.1.8, which I downloaded and installed tonight. I am running the latest Oracle drivers (classes111.zip), which I also downloaded (specifically, I am using the thin driver). I am developing in IBM's Visual Age Professional 2.0. I am running on NT Server 4.0 Enterprise Edition. Both the program and Oracle are running on this same machine, hence there is no communication across the network whatsoever. All of my environment variables (CLASSPATH and PATH) are set correctly. I have a PentiumII 450 with 320MB memory. I have pared down my program so that there is nothing left but the attempt to make the connections (in fact, now I am not even assigning the connection to anything, I removed that too to try to speed it up -- no luck). I have run this from within the dev environment, and out of it from the command line, with virtually no difference in performance. Still, opening these connections is dog slow -- and from the responses I have gotten from others, they can perform this task in at least half the time. Here is my code below:

public static void main (String args []) throws SQLException {

 DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());  long l;
 for (int i=1; i <= 10; i++)
 {
  l = System.currentTimeMillis();
  DriverManager.getConnection("jdbc:oracle:thin:@MACHINE1:1521:DB1", "username", "password");
  /* yes I am 100% positive the above line does open a connection */   System.out.println(System.currentTimeMillis() - l);  }

}

Here is the output:

952
892
890
890
933
880
963
881
912
905

Nearly a second per connection that I want to open. 10 seconds just to run that code above? That just seems atrocious. Does anyone have any clue as to why these might be taking so long? Is there any specific Oracle nuance that affects connection time? Could anyone run this code above against your Oracle database so that I could get some idea of exactly HOW slow this is? Thanks!

Anyone? Bueller? Anyone? Thanks in advance.

BradO Received on Thu Nov 25 1999 - 18:16:22 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US