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 > Optimize within select clause

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-02-07, 06:40
ahmedwaseem2000 ahmedwaseem2000 is offline
Registered User
 
Join Date: Jan 2005
Posts: 75
Optimize within select clause

Hi,

How can i reduce query optimization in the select query? something like this SET CURRENT QUERY OPTIMIZATION=0 ; or how can i define the optimization level for all the sessions of a particular id?

Thanks,
Waseem
Reply With Quote
  #2 (permalink)  
Old 07-02-07, 14:51
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
The CURRENT QUERY OPTIMIZATION special register has session scope. Thus, you set it once and all subsequent SQL statements will use this optimization level. As a global setting for a database, you can change the DB CFG parameter DFT_QUERYOPT.

I believe there may be even an option to set the optimization level for the current statement only. I just don't recall the details of that, however.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
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