Skip to Main Content
Oracle Data Warehouse Tuning for 10g
book

Oracle Data Warehouse Tuning for 10g

by Gavin JT Powell
April 2011
Intermediate to advanced content levelIntermediate to advanced
504 pages
16h 49m
English
Digital Press
Content preview from Oracle Data Warehouse Tuning for 10g
14.3 Capacity Planning 419
Chapter 14
SELECT TABLE_NAME
,BLOCKS*8192 AS BYTES
,ROUND(BLOCKS*8192/1024/1024) AS MB
,ROUND(BLOCKS*8192/1024/1024/1024,1) AS GB
FROM USER_TABLES;
This query shows sizes for all indexes in a schema for each table:
SELECT TABLE_NAME
,SUM((LEAF_BLOCKS
+DECODE(BLEVEL,0,1,1,1,LEAF_BLOCKS/BLEVEL))*8192) AS BYTES
,ROUND(SUM((LEAF_BLOCKS
+DECODE(BLEVEL,0,1,1,1,LEAF_BLOCKS/BLEVEL))*8192)/1024/1024)
AS MB
,ROUND(SUM((LEAF_BLOCKS
+DECODE(BLEVEL,0,1,1,1,LEAF_BLOCKS/BLEVEL))*8192)
/1024/1024/1024,1) AS GB
FROM USER_INDEXES GROUP BY TABLE_NAME;
Note: Obviously, the table and index queries could be joined.
14.3.5 Exact Column Data Lengths
This method ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Oracle 10g Data Warehousing

Oracle 10g Data Warehousing

Lilian Hobbs, Susan Hillson, Shilpa Lawande, Pete Smith
Expert Oracle Enterprise Manager 12c

Expert Oracle Enterprise Manager 12c

Kellyn Pot'vin, Anand Akela, Gokhan Atil, Bobby Curtis, Alex Gorbachev, Niall Litchfield, Leighton Nelson, Pete Sharman

Publisher Resources

ISBN: 9781555583354