Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2009
    Posts
    15

    Unanswered: CARDF column of SYSIBM.SYSTABLES

    Hello,


    I am using DB2 v9 on Windows XP SP 2 and I'm running the following query on SYSIBM.SYSTABLES:
    SELECT NAME,CREATOR,CARDF,DBNAME,TSNAME,PARENTS,CHILDREN,CASE WHEN TYPE='T' THEN 'Table' WHEN TYPE='X' THEN 'Auxiliary' WHEN TYPE='G' THEN 'Temporary' END,CREATEDTS,ALTEREDTS,STATSTIME FROM SYSIBM.SYSTABLES WHERE( TYPE='T' OR TYPE='X' OR TYPE='G') ORDER BY 2, 1

    I am referring to CARDF property which keeps the count of the rows on a certain table.
    The problem is that after I add some rows in table columns (and commit), the CARDF value for it does not update. It returns 0 (-1) no matter how many rows I am adding.
    Does anyone know if this sys table gets updated after a certain period of time? Or what is the problem here?




    Thanks!

  2. #2
    Join Date
    Dec 2005
    Posts
    273
    CARDF does not contain "realtime statistic" data.

    You need to run the RUNSTATS - utility to update this column

  3. #3
    Join Date
    Mar 2009
    Posts
    15
    OK thanks!

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Also, you should not use sysibm.systables which can change from one release to another. You should use syscat.tables instead which is less likely to change and the contents of which are documented in the SQL Reference Vol 1 Appendix.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

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