现在,查看访问计划。
分析存取方案。
Run db2exfmt to generate access plan
运行db2exfmt生成访问计划
Listing 13 shows the new access plan.
清单13展示了新的访问计划。
It is a reasonably efficient access plan.
这是相当高效的访问计划。
This time you should see the same access plan.
这次,您将看到相同的访问计划。
An action that specifies the desired access plan.
一个操作:指定理想的访问计划。
There are three methods of viewing an access plan.
查看访问计划有三种方法。
Use the db2exfmt tool to generate the access plan.
使用db2exfmt工具生成访问计划。
DB2 would not reuse an access plan in this example.
在这种情况下,DB 2不会重用访问计划。
Generate the access plan using db2exfmt as follows.
使用db2exfmt生成访问计划,如下。
Listing 12 shows the basic component of an access plan.
清单12展示了访问计划的基本组件。
You get a different access plan in test than production.
您在测试中获得了一个不同于生产中的访问计划。
Listing 11 shows the access plan for the SELECT statement.
清单11展示了select语句的访问计划。
From this new access plan graph, you can see the following.
在这张新访问计划图中,您可以看到以下内容。
Use access plan information to help optimize SQL statements.
使用访问计划信息帮助优化sql语句。
Another advantage of access plan reuse is a reduced CPU load.
访问计划重用的另一个好处是CPU负载减小。
You can generate the access plan using DB2's explain facility.
可以用DB2的explain工具程序生成存取计划。
Database and database manager configuration from the access plan.
访问计划中的数据库和数据库管理程序配置。
The access plan for a given SQL statement is generated at bind time.
一个特定sql语句的存取计划是在绑定时生成的。
A good access plan is key for the fast execution of an SQL statement.
好的访问计划对于sql语句的快速执行至关重要。
This will result in more accurate costing, and more optimal access plan.
这将导致更精确的成本计算和更优的访问计划。
Collect distribution statistics and then generate the access plan again.
收集数据分布的统计信息,然后再次生成访问计划。
A query access plan similar to the following is chosen by the optimizer.
优化器会选择类似如下所示的查询访问计划。
If they are the same, then you are successful in recreating the access plan.
如果它们是相同的,那么您就成功地重新创建了访问计划。
This brings little overhead for compiling, but gives an optimal access plan.
这会增加一些编译负载,但却能够产生一个最优的存取计划。
To understand what's going on, let's look at the query and the access plan.
为了理解发生的情况,让我们分析这个查询和存取计划(access plan)。
Nevertheless, another access plan is generated when parameter markers are used.
然而,使用参数标记时,将生成另一个访问计划。
When the statement is compiled, its access plan is stored in the package cache.
在编译语句时,语句的访问计划被存储在包缓存中。
Better UNION handling in the compile and optimization phase of the access plan.
在访问计划的编译和优化阶段提供更好的UNION处理。
应用推荐