Optimizing Trips From Server to JDBC Application Fetching a Long Raw
(Doc ID 414219.1)
Last updated on AUGUST 12, 2022
Applies to:
JDBC - Version 10.1.0.2 and laterInformation in this document applies to any platform.
Goal
An application is using Oracle JDBC driver in order to fetch Long Raw column (CREATE TABLE <TABLE NAME> (data long raw);)
This is done by using the Streaming method with the following
sequence of code :
bar = new byte[32768];
stmt = _conn.createStatement();
rset = stmt.executeQuery("SELECT data FROM <TABLE NAME>");
while (rset.next())
{
total = 0;
is = rset.getBinaryStream(1);
if (is != null)
{
while ((rd = is.read(bar)) > 0)
{
total += rd;
}
is.close();
}
}
The goal of this document is to show one way to optimize the number of trips from the server to the JDBC application (client) when fetching Long Raw type data
Solution
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Goal |
Solution |