Re: Pro*C newbie : need help with fetch on remote DB

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Tue, 07 Jul 1998 17:12:30 GMT
Message-ID: <35a5568d.15770286_at_192.86.155.100>


[Quoted] A copy of this was sent to "Pluton" <pluton_at_cybercable.tm.fr> (if that email address didn't require changing) On 7 Jul 1998 11:56:25 +0100, you wrote:

>
> Hello world.
>
> I would like to know if the "FETCH" statement is slow when executing on
>remote DB. Connecting via SQL*Net v1, TWO_TASK and ORACLE_SID env variables
>are set correctly but when a query results more than 20 lines, it is
>terribly slow....
> I use "make -f proc.mk sample10.pc" to compile the source. Do I need to
>set some parameters to enhance performance on FETCH ?
>
>Many thanks for your help.

sample10.pc uses single row fetches -- it fetches a single row, prints it, gets [Quoted] the next one.

A real program would use array fetches to reduce (significantly) the number of [Quoted] round trips between the client and server. You might, for example, array fetch [Quoted] 100 rows at a time in one round trip instead of 100 round trips.

To play with this easily, recommend you use SQLPlus and play around with the [Quoted] arraysize setting. Use this with set timing on and you'll see the difference [Quoted] array fetches can make (try arraysize 1 and then 10 and then 50 and then 100 and [Quoted] see the difference in response times -- it can be very large)...  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Tue Jul 07 1998 - 19:12:30 CEST

Original text of this message