Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2005

    Unanswered: Optimize within select clause


    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?


  2. #2
    Join Date
    Jan 2007
    Jena, Germany
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts