Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2008
    Location
    Toronto, Canada
    Posts
    399

    Unanswered: update the statistics on the system tables?

    We are migrating to v9.5.1. Migration guide says:

    During database migration, the statistics collected for system catalog tables are not retained. You must update the statistics for these tables using the RUNSTATS command.

    Do I understand this sentense "update the statistics on the system tables" right? When I asked this question before the answer was yes RUNSTATS on SYSCAT tables:
    http://www.dbforums.com/db2/1639462-...at-tables.html

    What does it mean exactly?
    RUNSTATS ON table SYSCAT.<tablename> ... ???

    But they are not tables but views.

    Thanks
    DB2 9.5/9.7 on Unix/AIX 6.1/Linux

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Run it on the underlying tables SYSIBM.*

    Andy

  3. #3
    Join Date
    Dec 2008
    Location
    Toronto, Canada
    Posts
    399
    Quote Originally Posted by ARWinner
    Run it on the underlying tables SYSIBM.*

    Andy
    Thanks, Andy.

    Do I understand it right that runstats should be done for SYSIBM table (not user/application tables)?
    DB2 9.5/9.7 on Unix/AIX 6.1/Linux

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    You should periodically do runstats on the user/application depending on their volatility. You only need to do runstats on the sysibm tables after major changes to the catalog (or after a migration).

    Andy

  5. #5
    Join Date
    Dec 2008
    Location
    Toronto, Canada
    Posts
    399
    Quote Originally Posted by ARWinner
    You should periodically do runstats on the user/application depending on their volatility. You only need to do runstats on the sysibm tables after major changes to the catalog (or after a migration).

    Andy
    Thanks for clarification, Andy. I appreciate it.
    DB2 9.5/9.7 on Unix/AIX 6.1/Linux

  6. #6
    Join Date
    Dec 2008
    Location
    Toronto, Canada
    Posts
    399
    done it (wrote a script to do runstats on all SYSIBM.tables) but most tables which names don't start with SYS (e.g. SYSIBM.SQLTABLES, SYSIBM.TABLES) are not updatable. Interesting...
    DB2 9.5/9.7 on Unix/AIX 6.1/Linux

  7. #7
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Quote Originally Posted by MarkhamDBA
    done it (wrote a script to do runstats on all SYSIBM.tables) but most tables which names don't start with SYS (e.g. SYSIBM.SQLTABLES, SYSIBM.TABLES) are not updatable. Interesting...
    That is because they are not tables, they are views.

    Andy

  8. #8
    Join Date
    Dec 2008
    Location
    Toronto, Canada
    Posts
    399
    Quote Originally Posted by ARWinner
    That is because they are not tables, they are views.

    Andy
    Right. While modifying the query I omitted TYPE='T' from WHERE clause so the query was selecting views as well. Good catch. Thank you, Andy
    DB2 9.5/9.7 on Unix/AIX 6.1/Linux

Posting Permissions

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