Step1-- Analyze the table.
Step 2
select table_name,chain_cnt,last_analyzed tablespace_namefrom from user_tables where chain_cnt >0;
or
---------
SELECT table_name,chain_cnt,round(chain_cnt/num_rows*100,2) pct_chained,
avg_row_len, pct_free , pct_used
FROM user_tables where chain_cnt>0;
__________________
Row chaining and row migration for apps user or hole database:
Step1-- Analyze the table.
1.Row chaining check
Step :1
>@?/rdbms/admin/utlchain.sql
step :2
spool table.sql
select 'ANALYZE TABLE '||owner||'.'||segment_name||' LIST CHAINED ROWS INTO chained_rows;'
from sys.dba_segments where segment_type='TABLE' and owner='APPS'
spool off
@table.sql
step 3
select table_name,chain_cnt,last_analyzed,tablespace_name from user_tables where chain_cnt >0;
or
---------
SELECT table_name,chain_cnt,round(chain_cnt/num_rows*100,2) pct_chained,
avg_row_len, pct_free , pct_used
FROM user_tables where chain_cnt>0;
example:
>@?/rdbms/admin/utlchain.sql
>analyze table emp list chained rows;
>select count(*) from chained_rows where table_name=’EMP’;
Output:
Count =0 no problem
Count > 0 means problem
No comments:
Post a Comment