Results 1 to 5 of 5

Thread: Select query

  1. #1
    Join Date
    Oct 2011
    Posts
    27

    Answered: Select query

    I'm looking for count(*) of all tables in syscat.tables and total size of the table (data+index+lob+long+xml).
    something like this
    TABSCHEMA.TABNAME, COUNT(*), SIZE in MB
    SCHEMA.TABLE, 22405, 160501

    Kindly let me know
    L

  2. Best Answer
    Posted by mark.b

    "Take a look at the ADMIN_GET_TAB_INFO function."


  3. #2
    Join Date
    Dec 2007
    Location
    Richmond, VA
    Posts
    1,328
    Provided Answers: 5
    If your stats are current, then you can read this data from the catalog.
    Dave

  4. #3
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    Take a look at the ADMIN_GET_TAB_INFO function.
    Regards,
    Mark.

  5. #4
    Join Date
    Oct 2011
    Posts
    27
    Thanks for reply. I
    Not sure about the stats. So that is ruled out.
    I'm curios how to get the count(*) from ADMIN_GET_TAB_INFO.
    I did a union of count(*) and sysibmadm.admintabinfo details. It worked for now.
    Ty
    L

  6. #5
    Join Date
    Oct 2011
    Posts
    27
    Mark I used the admin_get_tab_info and it worked fine. Again i still used select coun(*) union with that function.

Posting Permissions

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