Monday, August 3, 2009

Free Registration For Clonk Rage

Individual tables to check your space usage

To find out how much space is used in a table then we can really use this SQL statement: SELECT


TO _ CHAR ( SPACE ALLOCATED _ / 1024 / 1024 ,
999990.99) GREAT _MB,
TO _ CHAR ( SPACE _ USED / 1024 / 1024, 999990.99) NET _MB,
TO CHAR _ ((_ SPACE ALLOCATED - SPACE _ USED ) / 1024 / 1024,
999990.99) UNUSED _MB,
CHAIN _ PCENT CHAIN _PERCENT
FROM
TABLE (DBMS _ SPACE . OBJECT SPACE _ _ _ USAGE TBF (' Saper 3',
' MARA ',' TABLE ', NULL))

As an example, the table MARA in the schema Saper 3 checks - these are also the only two values which they have to adapt according to their database!

The result will look like this (examples MARA):

GREAT _MB NET _MB UNUSED _MB
279.00 263.28 15.72


GREAT MB = the actual size Table MB
NET _MB = the contents of the table in the MB
UNUSED _MB = the unused space in the table in MB

0 comments:

Post a Comment