Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Clobs extremely slow? Or is it my fault?
Hi,
have you tried using streams to get the data?
Clob clob = rs.getClob(3);
InputStream instream = Clob.getAsciiStream(); // Or Reader r =
Clob.getCharacterStream();
instream.read(...); //r.read(...);
cheers,
cindy
ajeru wrote:
> Hi
>
> I'm reading 600 Clobs in a simple loop from one table. This takes 2
> minutes to complete. I'm using the Java 1.22 JDBC thin driver for Oracle
> 8i 8.1.5. What am I doing wrong. Her is the code:
>
> ResultSet rs = ...
> while (rs.next()){
> Clob clob = rs.getClob(3);
> String s = clob.getSubString(1, MAX_TEXTITEM_LENGTH);
> ...
> }
>
> where MAX_TEXTITEM_LENGTH is 10000
> Any ideas?
>
> --
> Alexander Jerusalem
> ajeru_at_gmx.net
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Sat Feb 12 2000 - 12:16:37 CST