Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> It takes all kinds...
So, the optimization class in UDB is a global parameter
that cannot be changed when needed?
Interesting.
Obviously, the following is all false:
In:
ftp://ftp.software.ibm.com/ps/products/db2/info/vr7/pdf/letter/db2d3e70.pdf
DB2 Universal Database
Administration Guide: Performance
Version 7
SC09-2945-00
Chapter 3: Application Considerations
Section: Adjusting the Optimization Class
Paragraph: How do you set the Optimization Class?
<quote>:
The way to request a specific query optimization class depends on
whether you are using static or dynamic SQL.
Static SQL statements use the optimization class specified on the PREP
and BIND commands. The QUERYOPT column in the SYSCAT.PACKAGES catalog
table records the optimization class used to bind the package. If the
package is rebound either implicitly or using the REBIND PACKAGE
command, this same optimization class will be used for the static SQL
statements. If you want to change the optimization class used for
these static SQL statements, you must use the BIND command. If you do
not specify the optimization class, DB2 uses the default optimization
as specified by dft_queryopt.
Dynamic SQL statements use the optimization class specified by the
CURRENT QUERY OPTIMIZATION special register which is set using the SQL
SET statement. For example, the following statement sets the
optimization class to 1:
SET CURRENT QUERY OPTIMIZATION = 1
To ensure that a dynamic SQL statement always uses the same
optimization class, you may want to include this SET statement in your
application program. For more information, refer to the SQL Reference.
</quote>
Amazing what passes for "rational technical debate",
"credible sources", "professional competence"
and all other sorts of crap from the
DB2 / Niemic / Burleson / published books mob,
the "private lists" and their trolls...
It's a pity really that UDB/DB2 is being promoted by this kind of "credible source". The product IS a lot better and deserves a LOT better.
Cheers
Nuno Souto
wizofoz2k_at_yahoo.com.au.nospam
Received on Sun Jun 22 2003 - 19:11:04 CDT