Skip to content

Commit 3978d95

Browse files
committed
updated oracle_table_space_for_schema.sql
1 parent 2ba6761 commit 3978d95

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

oracle_table_space_for_schema.sql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
-- https://www.linkedin.com/in/HariSekhon
1414
--
1515

16-
-- Oracle - Show Tables' Space Used vs Free and Percentage Percentage where they are at lease 20% utilized
16+
-- Oracle - Show Tables' Space Used vs Free and Percentage Percentage
17+
--
18+
-- for tables over 20% utilized in a given tablespace
1719
--
1820
-- Tested on Oracle 19c
1921

@@ -46,7 +48,7 @@ WHERE
4648
AND
4749
t.num_rows > 0
4850
AND
49-
-- TUNE: currently only showing tables with over 20% free space
51+
-- TUNE: currently only showing tables over 20% utilized
5052
((t.blocks * 8 / 1024) - (t.num_rows * t.avg_row_len / 1024 / 1024)) / (t.blocks * 8 / 1024) > 0.2
5153
AND
5254
t.owner = 'USERS' -- XXX: Change this to your owner schema

0 commit comments

Comments
 (0)