Think Foward Logo Tested on Oracle 7 Tested on Oracle 8.0 Tested on Oracle 8i Tested on Oracle 9i Tested on Oracle 10g

SQL Script

Table Fragmentation

Updated: 13-Sep-2002
Version: 1.0

Description

This script lists details how chained or migrated rows there are within a table. It may help you determine if a table needs to be rebuilt. In order for this script to be effective, you must analyze your tables regularly.

Parameters

None

SQL Source

REM Copyright (C) Think Forward.com 1998- 2005. All rights reserved. 
CLEAR SET HEAD ON SET VERIFY OFF set pages 100 set lines 79 PROMPT PROMPT Table Fragmentation Report PROMPT col owner form a12 col table_name form a20 col empty_blocks form 999,999 heading "Empty Blks" col blocks form 999,999 heading "Blks" col pct form 99 select owner, table_name, num_rows, chain_cnt, (chain_cnt*100/num_rows) pct, empty_blocks, blocks from dba_tables where chain_cnt > 0 and owner not in ('SYS','SYSTEM') / exit

Return to Index of SQL Scripts


Site Map

General Information : Home | Company Profile | Contact Us | Legal
Database Support : Proactive Support | Pay Per Incident Support
Expert Services : High Availability | Creative Solutions | Training
Build Services : Oracle Installations | Revive your Oracle Setup | Low Cost Development
Free Oracle Resources: DBA Scripts | Oracle Links