aspose file tools*
The moose likes JDBC and the fly likes Type2/Type4 and preparedstatement relation? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Type2/Type4 and preparedstatement relation?" Watch "Type2/Type4 and preparedstatement relation?" New topic
Author

Type2/Type4 and preparedstatement relation?

yo nara
Ranch Hand

Joined: Apr 03, 2002
Posts: 35
Say I am using preparedstatement for executing queries.
if I use the same code using type2 and with type4 drivers.
which one will execute more faster and efficient.
is there any relation of preparedstatement with type of driver.
what i have read from books is that type4 is pure java solution and
more efficient than any other types.but since prepared statement are
compiled on server side.is ther any relation of preparedstatement and
type of driver.
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

Which database drivers do you want to compare? Since each implementation of type2 and type4 drivers are different, performance will vary within each type. The key is to find one that works for your situation( meets your functionality specs and performance expectations ) and best fits into your implementation plans.
Personally, I've found the type 4 easier to work with and deploy, and performance has been more than acceptable( Oracle's thin drivers ).
You might want to have a look through this chapter of Java Programming with Oracle JDBC. This compares Oracle's type 2 (OCI) and type 4 (thin) driver implementations.
Jamie
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Type2/Type4 and preparedstatement relation?