How to analyze size of table, index in Oracle

看 table 大小: SELECT * FROM all_tables WHERE table_name LIKE 'AB%' (記得檢查last_analyzed_date)

重新分析 table 大小: ANALYZE table TABLE_NAME estimate statisitics

看 index 相關資訊:(這裡不會有 block 資訊) SELECT * FROM all_indexes WHERE table_name LIKE'AB%'

重新分析 index: ANALYZE index INDEX_NAME validate structure;

看 index 大小: (這個一次只能看最近一次 analyze 過的 index) SELECT * FROM index_stats =>

  1. Index要rebuild後才準, delete/update record 通常不會free index block
  2. Block 的定義要請 DBA 查