Q
Problem solve Get help with specific problems with your technologies, process and projects.

Questions about CLOB data type

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.


This was last published in October 2004

Dig Deeper on Oracle Application Server

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close