Re: Fastest: Embedded SQL or OCI ?

From: Bill Manry <BManry_at_us.oracle.com>
Date: 1996/03/02
Message-ID: <4h881f$jk5_at_inet-nntp-gw-1.us.oracle.com>#1/1


Young_Charles <cyoung> wrote:
>My experience is that the OCI routines are about 50% faster than embedded
>SQL, using C and C++ on various Unix boxes. The primary reason for this,
>as far as I can tell, is that the OCI routines are written in assembly(!).
>I don't know if this holds true for Windows or any other non-Unix platform.

Though there might be some assembler "glue" code on some platforms, OCI is written in C like most of Oracle. It is a very thin layer compared to the code that supports Oracle precompiler programs. A well-written OCI application probably will use less client-side processor time than the equivalent Pro*something program. The catch here is "well-written". OCI requires that you manage each connection, cursor, and bind variable, and make a call for each of the individual steps involved in setting up and executing SQL. The precompiler and its runtime library handle much of this for you, including keeping track of cursors and bind variables in a cache of sorts.

Another thing worth mentioning is that we occasionally enhance Oracle's internal interfaces in ways that, for an OCI program, can only be utilized by modifying client source code. Precompiler programs may gain use of these enhancements with just a relink or (at worst) recompile using a newer release of the precompiler and library.

Hope this helps.

/b

--
Bill Manry - Mainframe & Integration Technologies - Oracle Corp. USA
The above statements and opinions are my own and do not
necessarily represent those of Oracle Corporation.
Received on Sat Mar 02 1996 - 00:00:00 CET

Original text of this message