728x90

Question

How do you determine table space usage within a dbspace ?

Answer

INTRODUCTION

You may need to determine the amount of space each table uses within a dbspace. The sysmaster table sysptnext contains information about the start and size of partitions within the database server. You can query this table to determine table usage within a dbspace.


STEPS

To retrieve space usage information about tables in a dbspace, execute the following sql statement:

    SELECT DBINFO( "DBSPACE" , pe_partnum ) dbspace, dbsname databasename, tabname tablename, pe_size num_pages 
    FROM  sysmaster:sysptnext a, sysmaster:systabnames b 
    WHERE a.pe_partnum = b.partnum AND 
    DBINFO( "DBSPACE" , pe_partnum ) IN ("dbspacename1", "dbspacename2" ) 
    ORDER BY dbspace, num_pages DESC;

    dbspacename1, dbspacename2
      a comma separated list of the dbspace(s) for which you want the information



https://www-304.ibm.com/support/docview.wss?uid=swg21169341

728x90

+ Recent posts