没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
Øystein Grøvlen
Senior Principal Software Engineer
MySQL Optimizer Team, Oracle
February 25, 2015
How to Analyze and Tune MySQL
Queries for Better Performance
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
Program Agenda
Introduction to MySQL cost-based optimizer
Selecting data access method
Join optimizer
Sorting
Tools for monitoring, analyzing, and tuning queries
Influencing the Optimizer
1
2
3
4
5
6
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
Program Agenda
Introduction to MySQL optimizer
Selecting data access method
Join optimizer
Sorting
Tools for monitoring, analyzing, and tuning queries
Influencing the Optimizer
1
2
3
4
5
6
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
MySQL Optimizer
SELECT a, b
FROM t1, t2, t3
WHERE t1.a = t2.b
AND t2.b = t3.c
AND t2.d > 20
AND t2.d < 30;
MySQL Server
Cost based
optimizations
Heuristics
Cost Model
Optimizer
Table/index info
(data dictionary)
Statistics
(storage engine)
t2
t3
t1
Table
scan
Range
scan
Ref
access
JOIN
JOIN
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
Cost-based Query Optimization
• Assign cost to operations
• Computes cost of partial or alternative plans
• Search for plan with lowest cost
• Cost-based optimizations:
General idea
Access method
Subquery strategy Join order
t2
t3
t1
Table
scan
Range
scan
Ref
access
JOIN
JOIN
剩余57页未读,继续阅读
资源评论
balibali_118
- 粉丝: 1
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功