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

From: Pluton <pluton_at_cybercable.tm.fr>
Date: 9 Jul 1998 11:12:38 +0100
Message-ID: <01bdab1a$4e2aa940$096346c0_at_basix>


Thanks a lot for the answer!
I understand that I have to use SQL*Plus and play with the "arraysize" and "maxdata" (?) settings. The problem I have, is to write a little server which is logged on a DB and listening on a socket for connection to execute query and "update,insert,delete". This would be something like that :

	telnet a.b.c.d xxx
	....
	select * from table where something
	....
	update...
	....
	quit
	connection closed.

I have no problem for the socket server side of this server. The problem comes from remote DB if I don't use "host arrays" : it is too slow ! ("select" is "Snail sELECT" :)
I don't have found the "host arrays" version for the sample10.pc.... and the "sample3.pc" and "sample9.pc" that deal with host arrays are too far from "sample10.pc" for me.

Please, can anyone guide me to implement host arrays with "full dynamic" method ?
many thanks !

Thomas Kyte <tkyte_at_us.oracle.com> a écrit dans l'article <35a5568d.15770286_at_192.86.155.100>...
> 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
> the next one.
>
> A real program would use array fetches to reduce (significantly) the
number of
> round trips between the client and server. You might, for example, array
fetch
> 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
> arraysize setting. Use this with set timing on and you'll see the
difference
> array fetches can make (try arraysize 1 and then 10 and then 50 and then
100 and
> 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 Thu Jul 09 1998 - 12:12:38 CEST

Original text of this message