Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2006
    Location
    Tuticorin, India
    Posts
    103

    Unanswered: Explain tables cleanup

    Env : DB2 9.1/AIX 5.3

    What is the best method to cleanup explain tables. Manual delete from each tables or is there any foreign key relationship among them which would auto-delete records if I delete from parent table ?

    Table/Count

    EXPLAIN_INSTANCE 218
    EXPLAIN_STATEMENT 436
    EXPLAIN_DIAGNOSTIC 764
    EXPLAIN_DIAGNOSTIC_DATA 1528
    EXPLAIN_OBJECT 2846
    EXPLAIN_OPERATOR 3879
    EXPLAIN_PREDICATE 3947
    EXPLAIN_STREAM 5530
    EXPLAIN_ARGUMENT 20054

  2. #2
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    Explain tables have R/I , please check .../sqllib/misc/EXPLAIN.DDL for details. One way to cleanup is to drop and recreate them. You can also delete data or use load/replace from /dev/null to truncate them. Load can put them in checking pending state and you can use set integrity with the immediate unchecked option to take them out of checking pending without being checked for integrity violations.

  3. #3
    Join Date
    Dec 2007
    Location
    Richmond, VA
    Posts
    1,328
    Provided Answers: 5
    DB2UDBGIRL,
    We're on Z/OS, but same can be done on LUW. We unload(export) the most recent 3 versions then load replace to the tables. Pretty much same as our syspackage table, where we free anything prior to our most recent 3 versions.
    Dave Nance

Posting Permissions

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