Programs on java c Oracle 11 (these tests with Enterprise on a local area network). I tried 2 different drivers (I started with Thin, and today I came across OCI).
String jdbcUrl = "jdbc:oracle:thin:@clnode1:1521:db1"; String jdbcUrl = "jdbc:oracle:oci:@clnode1:1521:db1"; The test is, of course, primitive, a small query is executed 1000 times in a loop, Connection is reused. Without OracleDataSource pool = new OracleDataSource(); ( Connection not closing ) work approximately equally (1.75 with OCI and 1.7 Thin), and with pooling ( Connection in the program I close, but it naturally remains open in the pool) driver Thin (2.9 c), and OCI (3.95 c).
If Connection closed in a loop (no pool), it is also approximately the same (57.2 with OCI and 58.2 Thin).
The documentation says that Thin:
is platform independent
but about OCI:
The JDBC OCI driver directly from the JCBC OCI driver directly from Java, thereby providing a high degree of compatibility. Because they use native methods, they are platform specific.
Who can advise which driver to use when?