JDBC Select Performance - Mailing list pgsql-hackers

From Thomas Hii
Subject JDBC Select Performance
Date
Msg-id F356pjR2IVMgc6R9W0w00003e72@hotmail.com
Whole thread Raw
List pgsql-hackers
Hi,

While doing some testing with Postgresql 7.1, I noticed some perculiar 
behaviour with the JDBC driver. Selecting a single record from a table is 
5-10 times slower than doing an insert (even if the table only contains a 
single record, and the select query does not contain any join). On Oracle 
database, an insert is always slower than a select when running the same 
test.

At the moment, I've narrowed down the time consuming section of the code to 
ExecSQL() method in the org.postgresql.Connection class. There seems to be a 
"while" loop over a "switch" statement which I yet need to figure out what 
it is doing. Anybody has any idea why this section of code is so slow?

Note: I'm using Mandrake 7.2, IBM JDK 1.3 on 1Ghz Athlon with 256 RAM.
The Postgresql 7.1 is compiled with multibyte character turned on.
The Select statement itself takes 1-5 seconds which is almost 100 times 
slower than Oracle on the same PC. This is even without opening connection 
factored in.

Thomas Hii
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.



pgsql-hackers by date:

Previous
From: Mike Mascari
Date:
Subject: RE: Truncation of object names
Next
From: matthew green
Date:
Subject: re: NetBSD "Bad address" failure (was Re: Third call for platform testing)