Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Clobs extremely slow? Or is it my fault?

Re: Clobs extremely slow? Or is it my fault?

From: C. Ferguson <c_ferguson_at_rationalconcepts.com>
Date: Sat, 12 Feb 2000 18:16:37 GMT
Message-ID: <38A5A398.815051D7@rationalconcepts.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US