Results 1 to 5 of 5

Thread: DB2 Table size

  1. #1
    Join Date
    Oct 2004
    Posts
    28

    Unanswered: DB2 Table size

    How can I find out what the biggest table is in the database USING COMMAND LINE, is there a command to check this.

  2. #2
    Join Date
    Oct 2004
    Location
    Norway
    Posts
    53
    You can connect to the subsystem by CLI and selec its name from sysibm.systables

    ---

    /pF

  3. #3
    Join Date
    Oct 2004
    Posts
    28
    doing a select from sysibm.tables does not give you the size of the table.
    Is there another to find out what THE BIGGEST TABLE IS IN THE DATABASE, assumimg I have 5000 tables in the database.

    Please help ladies and gents

    Thanks

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Provided you have relatively current statistics, you can query FPAGES from SYSCAT.TABLES - that will give you the number of tablespace pages allocated for the table. It should be easy from there.

  5. #5
    Join Date
    Oct 2004
    Location
    Norway
    Posts
    53
    Look at what n_i said and open the manual for the system tables to find out what info you have there.

    Another way depends on how you designed your database schema and the OS and FS.

    On Mainframe, on VSAM datasets, with 1:1 partitioning, where all tables has it's own tablespace, the only thing you need to do is look at the extents for the dataset and see how many are in use. You can sort this in DSList.

    I don't know how tablespaces are stored on Windows and AIX, but it may work there as well.

    ---

    Regards

    /Filip

Posting Permissions

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