This is question is related to the CLOB data type. I am fetching the resultset into JDBC and then putting the values from the resultset into Java classes for caching those CLOB. When I query from the database into JDBC, the resultset is very fast. But when I go to convert it into a string and put those CLOB values, it's taking a really long time. Is that due to poor database design for CLOB, or is there any thing we can tune to get performance at the Java level? I am using thin JDBC drivers. I hope you will suggest something to sort this thing out.
You don't give me much to go on. To convert a CLOB to a string you can use:
int returned_chars = theClob.getChars(position, size, charBuffer);
Since the CLOB is large, you might try using an ASCII Stream:
InputStream clobStr = theClob.getAsciiStream(); then byte retrned_bytes = clobStr.read(byteBuffer);
Reading from the stream should be faster for large CLOBs.
Dig Deeper on Oracle Application Server
Related Q&A from John Garmany
I get the ORA-12541 error message when I try to connect through Forms6i and Reports6i Builder. I've started the listener. I have no problems ... Continue Reading
I am facing the ORA-04076 error. I googled the error but was unable to understand it. What exactly do I need to do to solve this? I am using Toad. Continue Reading
We are using Oracle Database. In our client site, we have 500 users using the database at one time. Sometimes the database objects become invalid ... Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.