How to enable an optimization profile?
如何启用优化概要文件?
The profile column holds the XML document containing the optimization profile.
profile列包含XML文档,其中包含优化概要文件。
The schema column is used to specify the schema name for the optimization profile.
schema列用于指定优化概要文件的模式名。
Any guidelines in the optimization profile must conform to the DB2 provided XML schema.
优化概要文件中的任何指南都必须遵从db2提供的XML模式。
You can use the following command to tell the optimizer to not use any optimization profile.
可以使用以下命令告诉优化器不要使用任何优化配置文件。
The optimization profile name and the valid guideline will be indicated in the explain output.
Explain的输出会指明优化概要文件的名称和有效的指南。
The XML optimization profile starts with the OPTPROFILE section indicating the version attribute.
xml优化概要文件以optprofile区段开始,该区段表明版本属性。
The example in Listing 13 shows an XISCAN guideline in the context of a complete optimization profile.
清单13中的示例展示了以完整优化概要文件为上下文的XISCAN准则。
These queries are then placed in an XML optimization profile along with the appropriate guidelines.
然后,将这些查询和一些适当的指南放到一个xml优化概要文件中。
The first argument specifies that the user is interested in creating the optimization profile table.
第一个参数表明用户对创建优化概要文件表感兴趣。
The second argument specifies that the intended user action is to create the optimization profile table.
第二个参数表明目标用户操作是创建优化概要文件表。
If you need to affect multiple queries, include multiple statement profiles in a single optimization profile.
如果需要影响多个查询,可在一个优化概要文件中包含多个语句概要文件。
With DB2 9 and dynamic SQL, REOPT ALWAYS can also be specified through a global - or statement-level optimization profile.
对于DB 29和动态sql,也可以通过一个全局或语句级别的优化配置来指定REOPT ALWAYS。
The name column contains the name of the optimization profile and may contain an alphanumeric string of up to 128 characters.
name列包含优化概要文件的名称,还可能包含最多由128个字符组成的字母数字式字符串。
For dynamic statements, the value of the CURRENT OPTIMIZATION PROFILE special register is determined by the following order.
对于静态语句,CURRENTOPTIMIZATION PROFILE专用寄存器的值根据以下顺序确定。
An optimization profile is an XML document that contains optimization guidelines. There are two categories of optimization guidelines.
优化概要文件是指包含优化准则的XML文档。
The first step in creating the optimization profile is to create an XML file, called example5.xml, that contains the following contents
创建优化配置文件的第一步是创建一个称为example5.xml 的 XML文件,它包含如下所示的内容
Before enabling an optimization profile, you must associate it with a unique schema-qualified name and store it in the SYSTOOLS.OPT_PROFILE table.
在启用优化概要文件之前,必须将其关联到一个惟一的模式限定名,并存储在SYSTOOLS . OPT _ profile表中。
Make sure you have enabled the correct optimization profile using the special register, client configuration option, or bind option, as appropriate.
确保已使用专用寄存器、适当的客户机配置选项或绑定选项启用了正确的优化概要文件。
Global guidelines that specify access plan parameters that are to be considered for all the statements while this optimization profile is in effect.
指定优化概要文件生效后需要对所有语句考虑的访问计划参数。
The optimization profile must conform to the optimization guidelines XML schema for validation, and consists of a number of sections as shown in Listing 1.
为了通过验证,这个优化概要文件必须遵从优化指南XML模式,并由一些区段组成,如清单1所示。
Then use the OPTPROFILE bind option at the package level, or the CURRENT optimization profile special register at the session level, to enable the optimization profile.
然后在包级别使用OPTPROFILE绑定选项,或者在会话级别使用CURRENTOPTIMIZATION PROFILE专用寄存器,从而启用优化概要文件。
The optimization profile in Listing 23 contains an XQuery expression that returns customer account information for companies that deal in software and trade in Yen currency.
清单23中的优化概要文件包含一个XQuery表达式,它为经营软件并以日元交易的公司返回客户帐户信息。
If a guideline is updated, or deleted from the table, then it is necessary to refresh the cache by issuing the FLUSH OPTIMIZATION PROFILE cache statement, so it can be used.
如果从这个表中更新或删除一个指南,那么需要通过发出FLUSHOPTIMIZATION PROFILEcache语句更新缓存,使之可以被使用。
The "profile Information" section of the db2exfmt output can be used to verify that the correct optimization profile and statement profile have been applied to the current query.
db 2 exfmt输出的“ProfileInformation”部分可以用来检验是否已将正确的优化概要文件和语句概要文件应用到当前的查询。
All SQL statements running in the environment will try to look for matches in the optimization profile that is active, and the matching is designed to be efficient with minimal overhead.
该环境中的所有sql语句将尝试从活动的优化概要文件中查找匹配项,而这种匹配是高效率、低开销的。
To view the query access plan using the optimization profile created, the SET CURRENT optimization profile statement can be used in combination with the SET CURRENT EXPLAIN MODE statement, as follows.
要查看使用了创建的优化配置文件的查询访问计划,可以结合使用SETCURRENTOPTIMIZATION profile语句和SET CURRENTEXPLAINMODEstatement,如下所示。
Existing optimization techniques should also be considered as part of a holistic optimization and tuning analysis of your application's performance profile (see sidebar).
已有的优化技术也应作为整体优化和应用性能特性调整分析的一部分来考虑。(见下)。
The guideline in the profile typically overrides the general optimization for the application settings, therefore giving good control of plan evaluation to the profile.
概要文件中的指南通常覆盖用于应用程序设置的常规优化,从而使概要文件能够更好地控制计划评估。
Once the profile is enabled, the optimizer automatically matches optimization guidelines to the appropriate statement.
一旦概要文件被启用,优化器将自动将优化准则匹配到对应的语句。
应用推荐