The result of this comparison can potentially point to out-of-date statistics - for example, used by the optimizer to select an incorrect access plan.
这种比较的结果可能会指向一些过时的统计信息—例如,优化器用来选择一个错误访问计划的统计信息。
You can leverage the extended use of multi-column statistics in DB2 9.5 to provide the optimizer more information to better estimate the cardinality in order to choose an optimal query access plan.
您可以利用DB2 9.5 中的多列统计信息的扩展用途来为优化器提供更多的信息,从而使优化器更好地估计基数,选择最佳的查询访问计划。
At each operator in the access plan, the optimizer estimates the cardinality output from the operator.
对于访问计划的每个操作符,优化器将估计该操作符的基数输出。
With this feature, the query optimizer can immediately consider the index when determining an access plan.
有了这个特性,查询优化器可以在决定访问计划时立即考虑索引。
In this case, the optimizer creates a different access plan, which may not be optimal if the user input is 0.
在这种情况下,优化器会创建的存取计划都是不一样的,这在用户输入为0时可能不是最优的。
First analyze the access plan that the optimizer chooses when no distribution statistics are available, which is only basic statistics for the table CARS, and that its indexes exist.
首先来分析一下,在没有分布统计信息,而只有cars表的基本统计信息及其索引的情况下,优化器选择的访问计划是怎样的。
The DB2 optimizer USES these statistics to determine the most efficient access plan for any given query, which improves query performance.
DB 2优化器使用这些统计信息为任何给定的查询决定最有效的访问计划,从而提高查询的性能。
When the DB2 optimizer forms a query access plan for a query, it divides the work among the database partitions which work in parallel.
当DB 2优化器为一个查询形成查询访问计划时,它将工作划分到多个数据库分区上,这些数据库分区是并行工作的。
Analyze the query access plan to visualize the choices the optimizer makes in accessing the data.
分析查询访问计划,从而可以切实看到优化器对访问数据作出的选择。
Access plan directives that force the optimizer to use the designated access method for data retrieval, either sequential scan or index scan.
访问计划指示,强制优化器使用指定的访问方法进行数据检索,要么是连续扫描,要么是索引扫描。
As you've seen in the steps above, the optimizer selects the optimal access plan based on available statistics.
您可以从以上步骤看到,这个优化器基于可用的统计信息选择了最优的存取计划。
Conflicting statistics: Inconsistent statistics may cause the optimizer to derive the wrong estimated costs and to make the wrong decision on access plan assessment.
统计数据冲突:不一致的统计数据可能会导致优化器对成本评估错误,作出错误的访问计划评估决策。
However, note that the state-of-the-art optimizer has a reason to generate a particular access plan, so it is important to ensure that we understand the inefficiency before we apply the guidelines.
然而需要注意的是,先进的优化器在生成一个特定的访问计划时,必然有其原因,所以在应用指南之前,务必理解是什么原因导致查询的性能低下。
When the following query is issued, the query optimizer will detect that the query can be answered using an MQT, and may choose an access plan that accesses the MQT.
当发出下面的查询时,查询优化器将检测到该查询可以用一个MQT来回答,因而可能会选择访问该MQT的一个访问计划。
If current statistics are not available, the optimizer may choose an inefficient access plan based on inaccurate default statistics.
如果无法获得当前的统计数据,优化器就可能会基于不准确的默认统计数据选择低效的访问计划。
When the index name is not specified, optimizer picks the cheapest single XML index access plan.
如果未指定索引名,优化器将选用成本最低的XML 索引访问计划。
This now populates the explain tables with the access plan chosen by the optimizer based on real and virtual indexes.
现在将用优化器根据实际和虚拟索引选择的访问计划来填充解释表。
The SQL explain facility provides detailed information about the access plan that the query optimizer chooses for an SQL statement.
SQL解释工具提供查询优化器为 SQL语句所选择的访问计划的有关详细信息。
The query optimizer will give priority to an execution plan involving an MQT over a plan that involves access to remote tables.
对于涉及到MQT 的执行计划,并且该 MQT 是涉及远程表访问的计划上的 MQT,查询优化器给予它优先权。
However, you would still like the optimizer to find the best access plan based on the values that users have passed into the query.
然而,您可能仍然希望优化器基于用户传递给查询的值来查找最佳的存取计划。
The optimizer takes account of these changes and selects the optimal access plan when the job is executed.
而优化器会考虑这些变化,并且在作业执行时选择最佳访问计划。
Rebind applications that use static SQL after using RUNSTATS so that the query optimizer can choose the best access plan given the new statistics.
在使用RUNSTATS之后需要重新绑定使用静态SQL的应用程序,这样查询优化器就可以选择新统计信息所给出的最佳存取方案。
For comparison, Figure 3 illustrates the access plan where I forced the DB2 optimizer to ignore the index by adding the clause SELECTIVITY 1 to the predicate in the where clause.
为了便于比较,图3显示了通过将SELECTIVITY1子句添加到where子句的谓词中,强迫db2优化器忽略索引的访问计划。
The DB2 optimizer stores the access plan created in the prepare phase in the SQL statement cache (also called package cache in DB2) for reuse purposes.
DB 2优化器将准备阶段中创建的访问计划存储在sql语句缓存(在DB 2中也称为包缓存)中以便重用。
From the access plan graph, you can see what choices the optimizer has made regarding how the query will be processed and the rationale for those choices.
从这张访问计划图中,您可以看到优化器对如何处理查询作出何种选择以及理由。
After repeating the above steps to explain the query again to generate the query access plan, the optimizer computes a better cardinality estimate that is very close to the actual result.
重复上面的步骤,再次解释查询,生成查询访问计划之后,优化器会计算出一个更好的、与实际结果很接近的基数估计值。
This provides the optimizer with the most accurate information with which to determine the best access plan. For example.
这就为优化器提供了用于确定最佳访问计划的最准确的信息。
A query access plan similar to the following is chosen by the optimizer.
优化器会选择类似如下所示的查询访问计划。
The Database Context section lists the configuration parameters that the optimizer takes into account to determine the access plan with the least resource cost.
DatabaseContext区域列出了优化器在确定具有最少资源成本的访问计划时所考虑的配置参数。
The Database Context section lists the configuration parameters that the optimizer takes into account to determine the access plan with the least resource cost.
DatabaseContext区域列出了优化器在确定具有最少资源成本的访问计划时所考虑的配置参数。
应用推荐