Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

BLOB.getBytes() and CLOB.getSubString()

843859Aug 4 2008 — edited Aug 6 2008
Hello,

I have a question concerning 2 methods of the JDBC driver.

Class java.sql.BLOB contains one method getBytes(long pos, int length).

Class java.sql.CLOB contains one method getSubString(long pos, int length).

Here is my question : When I use these 2 methods, does the JDBC driver download the entire BLOB/CLOB in memory to execute the getXXX()?
It is important if BLOB/CLOB are very big... I just want to show an extract to the user. So, I don't want the driver download the entire BLOB/CLOB in memory... For example, with a getSubString(1,2) Imagine if JDBC download the entire CLOB (maybe 4-5Mo and more!) to extract only 2 characters...

I think it work like this (buffer?...) But I'm not sure so if someone can confirm...

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 3 2008
Added on Aug 4 2008
3 comments
531 views