Xref: alice comp.databases.oracle.misc:32943 comp.databases.oracle.server:52240
Newsgroups: comp.databases.oracle.misc,comp.databases.oracle.server,comp.database.oracle
Date: Sun, 6 Jun 1999 20:06:09 +0300
From: ga@alerts.co.il
Subject: oracle8 OCI
Message-ID: <Pine.SO4.4.10.9906061947060.1334-100000@adam.alerts.co.il>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: 6 Jun 1999 20:06:27 +0200, adam.alerts.co.il
Lines: 31
Path: alice!news-feed.fnsi.net!newspump.monmouth.com!newspeer.monmouth.com!colt.net!news-lond.gip.net!news.gsl.net!gip.net!news.barak.net.il!adam.alerts.co.il!ga


I have a multi-threaded appl that runs OCI 7.3 and does great.  The appl
is built for hi speed reads.  At startup, each thread creates a static
cursor for the read.  For example, select field1, field2 where id=:1

I bind and define my vars at startup and do an oparse.

When a request comes in, i just copy the input id to the bind varaiable
and do an oexfet.  1 round trip to oracle to get the data each time
(this appl can do 500 reads per second with this method).

The key to the speed, i think, is the static cursor was set up, so there
was no need for oracle to do any work except the lookup.  

Now i must convert to OCI 8.x - man did they change things around.
From what i have read - i do not see the concept of a static cursor.  

Is it possible to do one prepare, bind and describe. Then when a requests
comes in, copy the input to the bind variable and then do an execute and
get the one record?

It seems to me the new execute does the equivalent of a oparse and oexfet.
Therefore oracle will have to reparse the sql stmt each time it is
submitted (i know that oracle can checked its cache to see if the same sql
stmt is already parssed - but that is also an extra step that is not
needed)

thanks ahead for any insites
GA


