Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: OCI8 Perfomance Problem!
George,
I've timed OCI8 using the following code:-
void dual()
{
COCIStatement stmt(&s1);
stmt = "select 1 from dual";
int i;
stmt.define_by_pos(1,i);
for(int j = 0; j < 1000; j++)
{
stmt.execute();
}
}
The times I get range from 0.791 to 0.821 secs.
Computer used: PII 300, 128MB RAM, Local 8.0.4 Oracle database.
Library used: ociwrap.lib (from
http://freespace.virgin.net/j.hatcher/ociwrap.htm )
George Mikeladze wrote:
> Hi ALL!
>
> DOES AnyOne Have Such Problem???:
>
> We have ported application from OCI7 to OCI8 - and there is significant
> slowdown!
>
> So I have done tests:
>
> 1) OCI7
> Execute "select 1 from dual" 1000 times using oexfet().
> oparse() was called only once.
> TIME=0.5 sec
>
> Oracle TRACE (tkprof) tells that Oracle8 Server took 0.5 sec to do this.
>
> 2) OCI8
> Execute "select 1 from dual" 1000 times using OCIStmtExecute() using iters
> parameter =1, so no more fetching is required.
> OCIStmtPrepare() was called only once.
> TIME=3 sec
>
> Oracle TRACE (tkprof) tells that Oracle8 Server took 0.5 sec to do this.
> SO WHERE ARE THAT 2.5 SECs???
>
> After tkprof-ing I found that oracle is parse-ing only once in both cases.
> But! repeating case 1) with OCI7 and parseing before each execute gives also
> 3 sec!
>
> We use same LIB and DLLs for both cases.
> Tests are run against local Oracle8.0.4 on WinNT4 on Dual PPro200+256Mb
> RAM+RAID.
>
> Thanks in forward!
> George Mikeladze.
Received on Wed Sep 02 1998 - 05:25:30 CDT