Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2007
    Posts
    265

    Unanswered: How to get the estimated size of an index

    Hi, I'm aware that one can get the size of a table after giving the RUNSTATS command and then giving a command like this --

    db2 "select substr(t.tabschema,1,10)||'.'||substr(t.tabname,1, 20) as table ,char(date(t.stats_time)) as statsdate ,char(time(t.stats_time)) as statstime ,T.CARD as rows_per_tbl, decimal(float(t.npages)/(1024/(ts.pagesize/1024)),9,2) as used_mb ,decimal(float(t.fpages)/(1024/(ts.pagesize/1024)),9,2) as allocated_mb from SYSCAT.TABLES T ,SYSCAT.TABLESPACES TS where t.tbspace=ts.tbspace and T.tabname='EMPLOYEE' and T.TYPE='T'"

    TABLE STATSDATE STATSTIME ROWS_PER_TBL USED_MB ALLOCATED_MB
    ------------------------------- ---------- --------- -------------------- ----------- ------------
    DB2USER .EMPLOYEE 11/21/2011 17:45:08 811088680 38428.18 38428.18



    Similarly, is there a command I can give after giving RUNSTATS on the index of a table that will give me the estimate of the index size? thanks!!

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    there is a column that indicates the nbr of leaf pages..
    and also info about intermediate levels..
    maybe this will help
    Space requirements for indexes - IBM DB2 9.7 for Linux, UNIX, and Windows
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •