Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: JDBC Driver extremely slow??
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 DBAReceived on Mon Mar 06 2006 - 15:31:48 CST
![]() |
![]() |