If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Explain tables cleanup

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-09-09, 10:38
db2udbgirl db2udbgirl is offline
Registered User
 
Join Date: Mar 2006
Location: Tuticorin, India
Posts: 100
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
Reply With Quote
  #2 (permalink)  
Old 06-09-09, 21:46
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
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.
Reply With Quote
  #3 (permalink)  
Old 06-10-09, 12:42
dav1mo dav1mo is offline
Registered User
 
Join Date: Dec 2007
Location: Richmond, VA
Posts: 782
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On