Re: OCI slower the proc program

From: Brenda Muller <bmuller_at_kenan.com>
Date: Wed, 16 Sep 1998 13:49:59 -0600
Message-ID: <36001667.87AE9CF1_at_kenan.com>


Make sure that you're re-using your cda in the OCI program, i.e. not issuing oclose() after each call, and then re-allocating the cda, etc. Are you sure that you're getting 100 rows at a time? The ARRAY_SIZE (or whatever it is) parameter that you set with Pro/C has no effect on OCI - you need to explicitly array fetch. Also, make sure you're linking in DEFERRED mode.

OCI is supposed to be faster than Pro/C because it's the "direct" access method. Pro/C ultimately uses oci calls... BUT, programming in OCI is more complex - there are a lot more dynamics here, and you need to be more explicit, and there's hardly any good documentation on it.

Brenda Muller

Thomas Kyte wrote:

> A copy of this was sent to Brian Weedman <brianw_at_xnet.com>
> (if that email address didn't require changing)
> On 16 Sep 1998 15:31:02 GMT, you wrote:
>
> >
> >
> > I have a proC program and the same thing using OCI. the Proc version is
> > quit a bit faster then the OCI version. Both are fetching a 100 rows at a time.
> > I have them working the same exept that the oci version takes alot longer.
> >
> > I thought OCI was suppose to be faster than Proc?
> >
>
> no its not necessarily faster but it shouldn't be necessarily slower. OCI and
> Pro*c can run at comparable speeds.
>
> Have you turned on sql_trace in the application and used tkprof to see what the
> 2 programs are doing and where the performance difference is?
>
>
> 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 Wed Sep 16 1998 - 21:49:59 CEST

Original text of this message