Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Connection handling with jdbc.oracle.thin
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
"Steve Hall" <stephenhallANTISPAM_at_earthlink.net> wrote in message news:aqim3ss49qisdgfj1qpd3dntlmjv8der54_at_4ax.com...
>> >to the oracle server. I read lots of documentation but I did not
> >There is no exception thrown and no error log. After some debugging
> >it seems that <statement>.executeQuery() never returns and that this
> >is not a query or RDBMS problem but a timeout on the network connection
>
>
>
>
>
>
>