MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Difference b/w Plan_table and SYSIBM.SYSPLAN

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
jajularamesh
Beginner


Joined: 14 Apr 2006
Posts: 87
Topics: 33

PostPosted: Wed Jun 06, 2007 1:45 am    Post subject: Difference b/w Plan_table and SYSIBM.SYSPLAN Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed Jun 06, 2007 7:12 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
videlord
Beginner


Joined: 09 Dec 2004
Posts: 147
Topics: 19

PostPosted: Sun Jun 10, 2007 11:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
jajularamesh
Beginner


Joined: 14 Apr 2006
Posts: 87
Topics: 33

PostPosted: Thu Jun 14, 2007 11:23 pm    Post subject: Reply with quote

thanks videlord
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group