Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2007
    Posts
    9

    Unanswered: Determine the size of a DB2 table

    Hi there,

    We are using DB2 version 8 fixpack 10 on AIX. All table spaces are SMS, actuall... we just have 1 tablespace that contains all the tables. How do I determine the physical size of just one of the tables in the tablespace? I believe I can use db2 inspect but that takes a very long time on a large database. Just wondering if there was an easier way? Thanks.

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Code:
    D:\>db2 get snapshot for tables on ???
    
                Table Snapshot
    
    First database connect timestamp     = 10/01/2007 13:38:13.188694
    Last reset timestamp                 =
    Snapshot timestamp                   = 10/03/2007 13:03:40.319739
    Database name                        = ???
    Database path                        = D:\DB2\NODE0000\SQL00001\
    Input database alias                 = ???
    Number of accessed tables            = 62
    
    Table List
     Table Schema        = SYSIBM
     Table Name          = SYSTABLES
     Table Type          = Catalog
     Data Object Pages   = 155
     Index Object Pages  = 71
     LOB Object pages    = 5376
     Rows Read           = Not Collected
     Rows Written        = 1156
     Overflows           = 6546
     Page Reorgs         = 0
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Apr 2007
    Posts
    9
    Thanks a lot! Now I just have to figure out how big a disk page is.

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    It's not a disk page, it's the tablespace page.

    Code:
    select tabschema, tabname, pagesize 
    from syscat.tables t, syscat.tablespaces s 
    where t.tbspaceid = s.tbspaceid
    ---
    "It does not work" is not a valid problem statement.

  5. #5
    Join Date
    Apr 2007
    Posts
    9
    Thanks for clearing that up! I was looking at this document and it referred to it as a "disk page". Oh well...

    http://publib.boulder.ibm.com/infoce...n/r0011337.htm

    Thanks again!

  6. #6
    Join Date
    Sep 2003
    Posts
    85
    How about REORGCHK UPDATE STATISTICS ON TABLE schema.table and check the TSIZE column for the table?

Posting Permissions

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