1. Calculation method of table occupancy space size
Select s.segment_name, DECODE (sum (BYTES), NULL, 0, sum (BYTES)/1024/1024) Mbytes From Dba_segments S Where s.segment_name = ' mtl_material_transactions '-table name and S.segment_type = ' TABLE ' Group by S.segment_name |
2. Method of calculating the size of index occupancy space
Select s.segment_name, DECODE (sum (BYTES), NULL, 0, sum (BYTES)/1024/1024) Mbytes From Dba_segments S Where s.segment_name = ' mtl_material_transactions_n1 '--index and S.segment_type = ' INDEX ' Group by S.segment_name |
3. Calculation method of partition table occupancy space size
Select s.segment_name, DECODE (sum (BYTES), NULL, 0, sum (BYTES)/1024/1024) Mbytes From Dba_segments S Where s.segment_type = ' TABLE PARTITION ' Group by S.segment_name |
4. Use of table space
| SELECT a.tablespace_name table space name, Round (a.b Ytes, 2) "Total Space (g)", Round (b.bytes, 2) "unused Space (g)", ROUND ((a.bytes-b.bytes)/a.bytes) * 100, 2) "Usage%" from (SELECT Tablespace_name, SUM ( BYTES)/(1024 * 1024 * 1024) BYTES from Dba_data_files GROUP by Tablespace_name) A, (SELECT tablespace_name, SUM (BYTES)/(1024 * 1024 * 1024) BYTES from Dba_free_space GROUP by Tablespace_ NAME B where a.tablespace_name = b.tablespace_name order by (a.bytes-b.bytes)/a.bytes) DES C |