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 > with DFT_QUERYOPT = 1 and 5, do we have two different accessplan?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-12-04, 16:32
M_RAS M_RAS is offline
Registered User
 
Join Date: Sep 2003
Location: canada
Posts: 230
with DFT_QUERYOPT = 1 and 5, do we have two different accessplan?

Hi All,
I am using db2v7.2 aix 5.2
I compiled an application with DFT_QUERYOPT=1 and transfer .bnd file to production that has been set up with DFT_QUERYOPT = 5 and bound it, I want to know the access plan is regarding to DFT_QUERYOPT = 1 or DFT_QUERYOPT = 5? please advise

Thanks
Reply With Quote
  #2 (permalink)  
Old 01-12-04, 17:54
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Re: with DFT_QUERYOPT = 1 and 5, do we have two different accessplan?

Quote:
Originally posted by M_RAS
Hi All,
I am using db2v7.2 aix 5.2
I compiled an application with DFT_QUERYOPT=1 and transfer .bnd file to production that has been set up with DFT_QUERYOPT = 5 and bound it, I want to know the access plan is regarding to DFT_QUERYOPT = 1 or DFT_QUERYOPT = 5? please advise

Thanks
I assume the access plan will be that of the instance against which you run the BIND command. I think you can even specify it when you run your BIND:

BIND ... QUERYOPT ...
Reply With Quote
  #3 (permalink)  
Old 01-12-04, 18:00
anil4321 anil4321 is offline
Registered User
 
Join Date: Feb 2003
Posts: 20
Re: with DFT_QUERYOPT = 1 and 5, do we have two different accessplan?

If you bind the application again in your new environment, it will use the optimization class specified in the BIND command.

If the optimization class is not specified in BIND, then the value of DFT_QUERYOPT db config parameter will be used. You can see the QUERYOPT column in syscat.packages to determine the optimization class used for the package.
Reply With Quote
  #4 (permalink)  
Old 01-12-04, 19:20
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
If you have static SQL, you should probably use at least optimization level 5. Even if you have dynamic SQL I would probably use level 2 or 3 at a minimum, especially if the statements are frequently repeated and are stored in dynamic package cache.

The value of dft_queryopt is used unless the SET CURRENT QUERY OPTIMIZATION statement or the QUERYOPT option on the bind command is used.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #5 (permalink)  
Old 01-13-04, 09:28
M_RAS M_RAS is offline
Registered User
 
Join Date: Sep 2003
Location: canada
Posts: 230
Quote:
Originally posted by Marcus_A
If you have static SQL, you should probably use at least optimization level 5. Even if you have dynamic SQL I would probably use level 2 or 3 at a minimum, especially if the statements are frequently repeated and are stored in dynamic package cache.

The value of dft_queryopt is used unless the SET CURRENT QUERY OPTIMIZATION statement or the QUERYOPT option on the bind command is used.

THANK YOU ALL for your help.
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