Table fragmentation [message #64185] |
Wed, 29 December 2004 08:52 |
Sam
Messages: 255 Registered: April 2000
|
Senior Member |
|
|
Hi all, Can anybody give me a script to find table fragmentation and also pls let me know, do i have to analyze the table to get the fragmentation report, i am running on 8.1.6
Rgds
Sam
|
|
|
Re: Table fragmentation [message #64187 is a reply to message #64185] |
Wed, 29 December 2004 19:02 |
Milind Deshpande
Messages: 93 Registered: May 2004
|
Member |
|
|
Hi Sam,
You can give a try to this script.
COL OWNER FOR A15
COL SEGMENT_NAME FOR A25
COL TABLESPACE_NAME FOR A15
COL SEGMENT_TYPE FOR A15
SELECT OWNER, SEGMENT_NAME, SEGMENT_TYPE, TABLESPACE_NAME, EXTENTS,
NEXT_EXTENT/1024/1024 "NEXT
EXTENT SIZE(MB)" FROM DBA_SEGMENTS
WHERE EXTENTS > 20
AND OWNER NOT IN ('SYS', 'SYSTEM','PERFSTAT');
COL OWNER CLEAR
COL SEGMENT_NAME CLEAR
COL TABLESPACE_NAME CLEAR
COL SEGMENT_TYPE CLEAR
Hope this helps.
Milind.
|
|
|
|