Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2003
    Location
    India
    Posts
    14

    Unhappy Unanswered: Appending to CLOB

    Hi,
    What is the best way to append varchar2 data to temperory CLOB.

    i keep doing this in a cursor

    dbms_lob.createtemporary(lc_doc,true);
    DBMS_LOB.WRITE(lc_doc, amount, offset, lc_header);
    DBMS_LOB.WRITEAPPEND(lc_doc,LENGTH(lc_detail),lc_d etail);

    In the end i insert the clob into a clob column.I previously used varchar2,but due to its limitation i followed this method only to find it considerably slowed my transactions.

    Is there any mistake that i have done?is there any better way for this?
    Pls advice

    Regds
    Manojkv

  2. #2
    Join Date
    Nov 2002
    Location
    Desk, slightly south of keyboard
    Posts
    697
    Hi,

    Most performance issues I've seen with CLOBS are due to in-line storage.

    You might consider creating a CLOB tablespace, storing your tables in their normal space with the LOBs out of line in the separate CLOB tablespace.

    PHP Code:
    ALTER TABLE <tablename
       
    MOVE TABLESPACE <normal_ts
       
    LOB (<list_of_lob_columns>) STORE AS 
          (
          
    TABLESPACE <lob_ts
          
    ENABLE STORAGE IN ROW 
          PCTVERSION 40 
          NOCACHE 
          NOLOGGING
          
    ); 
    Amend some of the parameters (such as NOLOGGING) as required.

    Maybe that will help?

    Cheers
    Bill

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •