Re: Oracle Perf.

From: Brent <bpathakis_at_yahoo.com>
Date: 18 Oct 2002 17:46:20 -0700
Message-ID: <1736c3ae.0210181646.5d5976b1_at_posting.google.com>


Burg <Burg_at_shaw.ca> wrote in message news:<3DB0518F.9050900_at_shaw.ca>...
> How do you fix a chained table with a Long Raw datatype?
>
> I am using this script right now, which works great for all tables that
> do not have a long datatype.
>
> create table CHAINED_ROWS (
> owner_name varchar2(30),
> table_name varchar2(30),
> cluster_name varchar2(30),
> partition_name varchar2(30),
> subpartition_name varchar2(30),
> head_rowid rowid,
> analyze_timestamp date
> );
>
> analyze table &table_name list chained rows;
>
> create table migrated_rows as
> select orig.* from &table_name orig, chained_rows cr
> where orig.rowid = cr.head_rowid
> and cr.table_name = upper('&table_name');
>
> delete from &table_name
> where rowid in
> (select head_rowid from chained_rows);
>
> insert into &table_name select * from migrated_rows;
>
> analyze table &table_name compute statistics;
>
> select table_name, num_rows, chain_cnt from dba_tables
> where table_name = &table_name;
>
> drop table CHAINED_ROWS;
>
> Greg Gerritsen

Greg,

    The problem you have with long dataypes is that you have datatype (potentially) larger than one block.

    Usually there is nothing you can do about chaining in this situation, as the data is larger than the block. Received on Sat Oct 19 2002 - 02:46:20 CEST

Original text of this message