Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Fragmented tables

user3240461Jan 23 2014 — edited Jan 24 2014

Hi,

We are using following query to check fragmented tables. Is it correct?

Oracle 10.2.0.4 (64bit) and OS AIX 6.1 (64bit).

select owner,table_name,blocks,num_rows,avg_row_len,round(((blocks*16/1024)),2)||'MB' "TOTAL_SIZE",

round((num_rows*avg_row_len/1024/1024),2)||'Mb' "ACTUAL_SIZE",

round(((blocks*16/1024)-(num_rows*avg_row_len/1024/1024)),2) ||'MB' "FRAGMENTED_SPACE"

from all_tables WHERE Owner IN ('USERNAME');

I am using alter table move with parallel (due to huge size of data ) optionĀ  and rebuild index for De-fragmentation. Is its OK?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 21 2014
Added on Jan 23 2014
23 comments
3,618 views