DB2 中 MQT 的匹配原理及使用技巧
2010-03-31 00:00:00 来源:WEB开发网下面是 fd.plan 打印出的执行计划和诊断信息:
Optimized Statement:
-------------------
SELECT Q3.CAT_DESC AS "CAT_DESC", Q1.TOTAL
FROM MQTSCH.SALES_BY_CATAS Q1,
(SELECT DISTINCTQ2.CAT_DESC, Q2.CAT_ID
FROM MQTSCH.PRODUCT AS Q2) AS Q3
WHERE (Q1.CAT_ID = Q3.CAT_ID)
Access Plan:
-----------
Total Cost: 98.6553
Query Degree: 1
Rows
RETURN
( 1)
Cost
I/O
|
0.4
HSJOIN
( 2)
98.6553
10
/---+----\
10 1
TBSCAN TBSCAN
( 3) ( 4)
74.9814 23.5881
9 1
| |
10 1
TABLE: MQTSCH SORT
SALES_BY_CAT ( 5)
Q1 23.5366
1
|
200
TBSCAN
( 6)
23.4286
1
|
200
TABLE: MQTSCH
PRODUCT
Q2
Extended Diagnostic Information:
--------------------------------
Diagnostic Identifier: 1
Diagnostic Details: EXP0073W The following MQT or statistical view was
not eligible because one or more data filtering
predicates from the query could not be matched with
the MQT: "MQTSCH "."SALES_BY_CAT".
Diagnostic Identifier: 2
Diagnostic Details: EXP0148W The following MQT or statistical view was
considered in query matching: "MQTSCH ".
"SALES_BY_CAT".
Diagnostic Identifier: 3
Diagnostic Details: EXP0149W The following MQT was used (from those
considered) in query matching: "MQTSCH ".
"SALES_BY_CAT".
- ››db2 对float类型取char后显示科学计数法
- ››DB2中出现SQL1032N错误现象时的解决办法
- ››DB2 锁升级示例
- ››db2诊断系列之---定位锁等待问题
- ››db2 命令选项解释
- ››DB2 最佳实践: 使用 DB2 pureXML 管理 XML 数据的...
- ››DB2 9.5 SQL Procedure Developer 认证考试 735 准...
- ››DB2 9.5 SQL Procedure Developer 认证考试 735 准...
- ››DB2 9.5 SQL Procedure Developer 认证考试 735 准...
- ››DB2 基础: 表空间和缓冲池
- ››DB2 XML 编程,第 1 部分: 理解 XML 数据模型
- ››DB2 pureScale 实战
更多精彩
赞助商链接