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!

dba_segments & dba_tables - inconsistent

538022Oct 30 2007 — edited Nov 2 2007
Hello guys,
i have seen some strange inconsistency between dba_segments and dba_tables.

Here are my tests.

1) dba_segments (http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_4097.htm#sthref2591)
->BLOCKS - Size, in Oracle blocks, of the segment
select segment_name, blocks from dba_segments where segment_name = 'MYTAB';
SEGMENT_NAME                                                                      BLOCKS                 
--------------------------------------------------------------------------------- ---------------------- 
MYTAB                                                                             7384                   

1 rows selected
2) dba_tables (http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_2105.htm#i1592091)
-> BLOCKS Number of used data blocks in the table
-> EMPTY_BLOCKS Number of empty (never used) data blocks in the table
select table_name, blocks, empty_blocks from dba_tables where table_name = 'MYTAB';
TABLE_NAME                     BLOCKS                 EMPTY_BLOCKS           
------------------------------ ---------------------- ---------------------- 
MYTAB                          7246                   66                     

1 rows selected
So lets calculate:
7384 blocks (dba_segments) != 7246 + 66 blocks (dba_tables)

The table is located in a LMT with ASSM.

So what's wrong - have you the same "problem"?

Regards
Stefan
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 30 2007
Added on Oct 30 2007
3 comments
885 views