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 -> Re: JDBC Driver extremely slow??

Re: JDBC Driver extremely slow??

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Mon, 06 Mar 2006 22:31:48 +0100
Message-ID: <6bap02t8rafpaj3sod0uamhoo2qg0fho8r@4ax.com>


On Mon, 6 Mar 2006 23:07:48 +0200, "vahapt" <vahapt[at'no'Spam]gmx.com.tr> wrote:

>tables have about 1000 entries, I know that indexing will further improve
>the execution but I cannot understand the difference between iSQL+ and JDBC.

Just guessing with hindsight:
sql*plus uses array fetching by default. The default array size is 15, so after every 15 records there will be a roundtrip between client and database, and there will be consistent gets to retrieve the next n records.
Jdbc doesn't use array fetching by default so the array size will be 1. This means you get a roundtrip after every records, and free consistent gets.
The impact of this can be huge. You can demonstrate this in sql*plus by issuing
set array 1
prior to your query.
If my guess is correct, make sure you set the prefetch count when opening the jdbc connection.

--
Sybrand Bakker, Senior Oracle DBA
Received on Mon Mar 06 2006 - 15:31:48 CST

Original text of this message

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