aspose file tools*
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 Java 8 in Action this week in the Java 8 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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Performance and driver type
 
Similar Threads
stale db connection
passed II with 90%
best programming practises of JDBC
Oracle driver query
Difference between Statement and PreparedStatement