We have huge table in Oracle Database and we have deleted millions of records in the table.Before deleting and after deleting there is no difference in size and no of records. We haven’t used Shrink command.
How to calculate realistic size of the table.
I have tried below query
SELECT
OWNER,
TABLE_NAME,
TRUNC(SUM(BYTES)/1024/1024) SIZE_IN_MB
FROM
(SELECT SEGMENT_NAME TABLE_NAME, OWNER, BYTES
FROM DBA_SEGMENTS
WHERE SEGMENT_TYPE IN ('TABLE', 'TABLE PARTITION', 'TABLE SUBPARTITION')
group by OWNER, TABLE_NAME
New contributor
Vijay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.