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 

plan_table

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


Joined: 20 May 2004
Posts: 77
Topics: 31

PostPosted: Thu Sep 09, 2004 3:55 am    Post subject: plan_table Reply with quote

Hi all,

question about plan_table:
everytime i use the option Explain(yes) at the bind moment it populates the plan_table. If i perform again the explain (yes), it updates the rows already contains in plan_table, or it adds new rows.

If a perfom the explain option hundred of times for the same program, i'm updating rows in plan_table or everytime i add there several rows.

Kind regards.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Sep 09, 2004 5:37 am    Post subject: Reply with quote

Monaco,
It is good idea to add rows to the plan_table rather than updating the existing rows in the plan_table if it had any. Sometimes DB2 uses the QUERYNO, APPLNAME, PROGNAME, VERSION, COLLID, and OPTHINT columns of the PLAN_TABLE to determine the rows to use for a hint. For a PLAN_TABLE row, the QUERYNO, APPLNAME, PROGNAME, VERSION, and COLLID values must match the corresponding values for an SQL statement before the SQL statement can use that row. In addition, the OPTHINT value for that row must match the value in the CURRENT OPTIMIZATION HINT special register if the SQL statement is executed dynamically. If the SQL statement is executed statically, the OPTHINT value for the row must match the value of bind option OPTHINT for the package or plan that contains the SQL
statement. If no PLAN_TABLE rows meet these conditions, DB2 determines the access path for the SQL statement without using hints.

Also it helps to compare the access paths from the previous bind to the new bind.


Hope this helps....

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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