📜  在 oracle 12c 中查询表大小 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:04:54.130000             🧑  作者: Mango

代码示例1
SELECT e.OWNER, e.SEGMENT_NAME, e.TABLESPACE_NAME, sum(e.bytes) / 1048576 AS Megs
FROM dba_extents e
WHERE
  e.OWNER = 'SCHEME_NAME' AND
  e.TABLESPACE_NAME = 'TBS_NAME' AND
  e.SEGMENT_NAME IN ('TABLE_NAME')
GROUP BY e.OWNER, e.SEGMENT_NAME, e.TABLESPACE_NAME
ORDER BY e.TABLESPACE_NAME, e.SEGMENT_NAME;