This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Performance and driver type Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Performance and driver type" Watch "Performance and driver type" New topic
Author

Performance and driver type

Jun Hong
Ranch Hand

Joined: Sep 05, 2001
Posts: 181
Hi guys,
I have a general question. We have four types of JDBC drivers. Normally, which one has better performance? I looked at the document from Oracle, they said OCI is faster than thin, but I did not find OCI faster. Theoretically, type II use bineray library and it should be faster than type IV however I heard people say type IV is the fastest.
Jun Hong
[ January 04, 2002: Message edited by: Jun Hong ]

Jun Hong<br />SCJP, SCJD, SCWCD, SCEA<br />IBM Certified Systems Expert(V4.0)
Stanley Tan
Ranch Hand

Joined: May 17, 2001
Posts: 243
That's a good question. I remember reading something like that before, but I can't really remember the details.
Why don't you try it yourself? For a fact, the Oracle thin driver is a little bit faster than the OCI driver.
Jun Hong
Ranch Hand

Joined: Sep 05, 2001
Posts: 181
Hi Stanley,
Thank you for your reply. I think right now we can use JIT or HotSpot JVM, and this makes thin driver faster. On IBM HotSpot JDK 1.3, I also find thin driver a little bit faster. Perhaps, in old days (before JIT) OCI was faster. Type I is slow and we all know that. Did someone try Type III?
Jun Hong
Stanley Tan
Ranch Hand

Joined: May 17, 2001
Posts: 243
Well, in general, Type IV drivers are the fastest because there is the least amount of layers to get to the database.
 
 
subject: Performance and driver type
 
Similar Threads
best programming practises of JDBC
Difference between Statement and PreparedStatement
Oracle driver query
passed II with 90%
stale db connection