Oracle 10g: Instant Client

For a very very long time, Oracle has been claiming that you need full installation of Oracle client to take advantage of OCI driver for JDBC, Pro*C, etc. That’s no longer true as the availablity of InstantClient.
I have done some testing on a windows 2003 box, 2.6 GHz single CPU, 2G Memory and 9.2.0.7 database with latest CPU patch. Yes, InstantClient works with older version of database too.
The test is batch insert into a table with 600,000 rows and TCP connection. Yeah, I did use bind variables.
Using 9i OCI driver under %ORACLE_HOME%\bin\ocijdbc9.dll, it takes 42 seconds with OCI driver and amazingly 24 seconds with thin driver. That validates the convention wisdom that thin driver is better than OCI driver.
However, if I used ocijdbc10.dll from instant client, it takes 6 seconds with OCI driver or thin driver.
That’s an amazing improvement. I have done similar test on a much slower Solaris box and the result is even more astonishing, from 214 seconds 9i OCI to 24 seconds instant client OCI.
And it’s very easy to switch, just include the instantclient path in LD_LIBRARY_PATH on *nix platforms and PATH in windows.
According to the InstantClient FAQ:
How does Instant Client interact with an ORACLE_HOME?

As long as the library loading path has the directory containing
Instant Client files (e.g. the instantclient directory) ahead of
library directory in ORACLE_HOME, the application will operate in the
Instant Client mode, and the libraries in the ORACLE_HOME will not be
used.

Of course, YMMV on the improvement. That’s why you want to test it and it’s great that the switch to and from InstantClient is easy. I have yet to determine where the improvement comes from, is it from variable binding?

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: