View previous topic :: View next topic |
Author |
Message |
jajularamesh Beginner
Joined: 14 Apr 2006 Posts: 87 Topics: 33
|
Posted: Wed Jun 06, 2007 1:45 am Post subject: Difference b/w Plan_table and SYSIBM.SYSPLAN |
|
|
HI
Please let me know the actual difference between plan_table and SYSIBM.SYSPLAN.
Actually i wanted to run explain on a query.
i have info that we need to check the plan_table which will be created by the Administrator.
i don't have plan_table in my shop.
Is it not possible to get the info from the SYSIBM.SYSPLAN instead of plan_table
Statement table is also not present in my shop please let me know is this tables are mandatory to run explain
Actually let me know exact difference between PLAN_TABLE & SYSIBM.SYSPLAN
Regards,
Ramesh(Venkata Apparao Jajula) |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Wed Jun 06, 2007 7:12 am Post subject: |
|
|
jajularamesh,
Jajularamesh,
SYSIBM.SYSPLAN is a DB2 catalog table which contains information about application plans, where as PLAN_table is a system/user table which contains information about each SQL. If you are looking for information about SQL using indexes and cost you need the plan_table. You canNOT get that information from the SYSIBM.SYSPLAN table.
Quote: |
i don't have plan_table in my shop.
|
You can create your own plan_tables/Statemenet_tables as shown here.
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNSQH11/5.54?DT=20010718164132
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
videlord Beginner
Joined: 09 Dec 2004 Posts: 147 Topics: 19
|
Posted: Sun Jun 10, 2007 11:46 pm Post subject: |
|
|
the explain result will be written to current_sqlid.PLAN_TABLE, current_sqlid.DSN_STATMENT_TABLE etc.
you can find the PLAN_TABLE DDL in prefix.SDSNSAMP(DSNTESC), customize and run it to create your own PLAN_TABLE and other table needed by EXPLAIN.
if you have DB2ADM or Visual EXPLAIN, the tool can create the tables for you if you do not have them. |
|
Back to top |
|
 |
jajularamesh Beginner
Joined: 14 Apr 2006 Posts: 87 Topics: 33
|
Posted: Thu Jun 14, 2007 11:23 pm Post subject: |
|
|
thanks videlord |
|
Back to top |
|
 |
|
|