DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: row chaing 8.1.7.0.0

  1. #1
    Join Date
    Jul 2001
    Posts
    181

    row chaing 8.1.7.0.0

    Hi what's the best way to eliminate row chaining in Oracle 8i I have a table with over 40,000 chained rows it is used for reporting and I am sure detremental to performance, what the best way to eliminate it!

    Can I use alter table move..

  2. #2
    Join Date
    Nov 2002
    Location
    New Delhi, INDIA
    Posts
    1,796
    Use bigger db_block_size or use bigger pctfree.

    RTFM
    Amar
    "There is a difference between knowing the path and walking the path."

    Amar's Blog  Get Firefox!

  3. #3
    Join Date
    Feb 2000
    Location
    Singapore
    Posts
    1,758

    Re: row chaing 8.1.7.0.0

    Originally posted by netbar
    Can I use alter table move..
    Yes, ALTER TABLE MOVE can fix them but to avoid re-ocurrance check your PCTFREE.
    Sanjay G.
    Oracle Certified Professional 8i, 9i.

    "The degree of normality in a database is inversely proportional to that of its DBA"

  4. #4
    Join Date
    Jul 2001
    Posts
    181
    Thanks,

    Apologies for new thread early on a monday morning...

  5. #5
    Join Date
    Nov 2002
    Location
    New Delhi, INDIA
    Posts
    1,796
    Please do not use two seperate threads for same question.

    As you asked :

    What about the existing problem??

    ---
    This will be solved with alter table move command as the table would be rebuild. And if you set the pctfree to a reasonable size then your existing chaining will also get solved.

    HTH
    Amar
    "There is a difference between knowing the path and walking the path."

    Amar's Blog  Get Firefox!

  6. #6
    Join Date
    Sep 2000
    Location
    Chennai, India
    Posts
    865
    You can use this code to remove chained rows in your table. Proof read the script and check it on test database before you use it on production.

    HTH.

    Code:
    ACCEPT chaintabl PROMPT 'Enter the table with chained rows: '  
      
    drop table chaintemp;  
    drop table chained_rows; 
      
    start d:\oracle\ora81\rdbms\admin\utlchain  
    
    analyze table &chaintabl   
    list chained rows into chained_rows;   
      
     
    create table chaintemp as  
    select *  
    from &chaintabl  
    where rowid in (select head_rowid  
    		from chained_rows);  
      
      
    delete from &chaintabl  
    where rowid in (select head_rowid  
    		from chained_rows); 
      
    insert into &chaintabl  
    select *  
    from chaintemp; 
      
    drop table chaintemp;

  7. #7
    Join Date
    Nov 2002
    Location
    New Delhi, INDIA
    Posts
    1,796
    ggnanaraj,

    this solution would be a temporary one, what about the future inserts and updates ??

    Go with alter table move.
    Amar
    "There is a difference between knowing the path and walking the path."

    Amar's Blog  Get Firefox!

  8. #8
    Join Date
    Jan 2002
    Location
    Up s**t creek
    Posts
    1,525
    Of course you may find that depending on the data in the rows (eg. if your usings LONG's) that row chaining is unavoidable and you will have to do as Amar said earlier and recreate the database with a larger block size.

    Regards
    Jim
    Oracle Certified Professional
    "Build your reputation by helping other people build theirs."

    "Sarcasm may be the lowest form of wit but its still funny"

    Click HERE to vist my website!

Posting Permissions

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


Click Here to Expand Forum to Full Width