Oracle

我的數據庫有多少塊

  • December 14, 2013

如何使用 Oracle SQL Developer 編寫查詢以查找我的數據庫正在使用多少塊?(表格和索引)

如果我正確閱讀了您的問題,這就是您要查找的內容:

SQL> select segment_type, sum(bytes)/1024/1024 as size_in_mb, sum(blocks) as size_in_blocks
 2  from dba_extents
 3  group by segment_type;

SEGMENT_TYPE       SIZE_IN_MB SIZE_IN_BLOCKS
------------------ ---------- --------------
LOBINDEX              43.4375           5560
INDEX PARTITION         61.75           7904
TABLE SUBPARTITION          2            256
TABLE PARTITION       70.6875           9048
NESTED TABLE           1.8125            232
ROLLBACK                .4375             56
LOB PARTITION         21.1875           2712
LOBSEGMENT              331.5          42432
INDEX                338.8125          43368
TABLE                   713.5          91328
CLUSTER                 60.25           7712
TYPE2 UNDO            14.3125           1832

12 rows selected.

SQL>

引用自:https://dba.stackexchange.com/questions/54969