- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
6#
发表于 2013-2-20 18:58:34
统计信息对比
测试环境:
SINGLE TABLE ACCESS PATH
Single Table Cardinality Estimation for T_FREEZELOG[T_FREEZELOG]
ColGroup (#1, Index) PK_FRZLOG
Col#: 1 9 CorStregth: -1.00
ColGroup Usage:: PredCnt: 2 Matches Full: Partial:
Table: T_FREEZELOG Alias: T_FREEZELOG
Card: Original: 14008159.000000 Rounded: 92159 Computed: 92158.94 Non Adjusted: 92158.94
Access Path: TableScan
Cost: 76739.56 Resp: 76739.56 Degree: 0
Cost_io: 76267.00 Cost_cpu: 7907220465
Resp_io: 76267.00 Resp_cpu: 7907220465
Access Path: index (AllEqRange)
Index: IX_FREEZELOG_USER_ID1
resc_io: 32748.00 resc_cpu: 461643837
ix_sel: 0.026316 ix_sel_with_filters: 0.026316
Cost: 32775.59 Resp: 32775.59 Degree: 1
Best:: AccessPath: IndexRange
Index: IX_FREEZELOG_USER_ID1
Cost: 32775.59 Degree: 1 Resp: 32775.59 Card: 92158.94 Bytes: 0
生产环境
SINGLE TABLE ACCESS PATH
Single Table Cardinality Estimation for T_FREEZELOG[T_FREEZELOG]
Column (#6):
NewDensity:0.000092, OldDensity:0.000000 BktCnt:5413, PopBktCnt:5410, PopValCnt:14, NDV:38
Column (#12):
NewDensity:0.002125, OldDensity:0.000000 BktCnt:5413, PopBktCnt:5413, PopValCnt:3, NDV:4
ColGroup (#1, Index) PK_FRZLOG
Col#: 1 9 CorStregth: -1.00
ColGroup Usage:: PredCnt: 2 Matches Full: Partial:
Table: T_FREEZELOG Alias: T_FREEZELOG
Card: Original: 13935158.000000 Rounded: 32834 Computed: 32834.49 Non Adjusted: 32834.49
Access Path: TableScan
Cost: 77604.19 Resp: 77604.19 Degree: 0
Cost_io: 77133.00 Cost_cpu: 7884378045
Resp_io: 77133.00 Resp_cpu: 7884378045
Access Path: index (AllEqRange)
Index: IX_FREEZELOG_USER_ID1
resc_io: 567486.00 resc_cpu: 8372202873
ix_sel: 0.472381 ix_sel_with_filters: 0.472381
Cost: 567986.35 Resp: 567986.35 Degree: 1
Best:: AccessPath: TableScan
Cost: 77604.19 Degree: 1 Resp: 77604.19 Card: 32834.49 Bytes: 0
1. 就10053 看 统计信息方面 ,2者是有差别的,测试环境中 似乎没有显示有histogram
2. PK_FRZLOG 上的列有 多列统计信息, 但是这个10053 trace显示的 这个multicolumn 统计信息 似乎不完整
===》
删除原有 histogram 和 col group statistics, 后 再观察一下。 |
|