关系型数据库工作原理-数据库查询器(翻译自Coding-Geek文章)
本文翻译自Coding-Geek文章:《 How does a relational database work》。原文链接:http://coding-geek.com/how-databases-work/#Buffer-Replacement_strategies
本文翻译了如下章节, 介绍数据库的客户端管理器组件:
Query manager-数据库查询器
本章描述的查询器是数据库强大能力的核心所在。通过查询器,所有的查询SQL语句将被转换为能快速执行的代码。代码执行后,执行结果将返回给客户端管理器。整个过程分为几步:
1. 解析SQL语句并检查它是否合法。
2. 然后改写SQL语句,移除多余无用的操作,并添加一些前置的优化动作。
3. 进一步优化SQL语句以提升查询性能,再转换为一组可执行命令和数据访问规划。
4. 然后编译SQL语句。
5. 最后,执行SQL查询。
在本章,我不会重点描述后面的两点,这两点不是很重要,也非关键所在。读完本章节,如果你想了解得更深入一点,可以读一下这些文献:
1. The initial research paper (1979) on cost based optimization: Access Path Selection in a Relational Database Management System. This article is only 12 pages and understandable with an average level in computer science.
2. A very good and in-depth presentation on how DB2 9.X optimizes queries here
3. A very good presentation on how PostgreSQL optimizes queries here. It’s the most accessible document since it’s more a presentation on “let’s see what query plans PostgreSQL gives in these situations“ than a “let’s see the algorithms used by PostgreSQL”.
4. The official SQLite documentation about optimization. It’s “easy” to read because SQLite uses simple rules. Moreover, it’s the only official documentation that really explains how it works.
5. A good presentation on how SQL Server 2005 optimizes queries here
6. A white paper about optimization in Oracle 12c here
7. 2 theoretical courses on query optimization from the authors of the book “DATABASE SYSTEM CONCEPTS” here and there. A good read that focuses on disk I/O cost but a good level in CS is required.
8. Another theoretical course that I find more accessible but that only focuses on join operators and disk I/O.
本文为博主原创文章,未经博主允许不得转载。其它文章请访问:http://blog.csdn.net/ylforever
关系型数据库工作原理-数据库查询器(翻译自Coding-Geek文章)的更多相关文章
- 关系型数据库工作原理-事务管理(一)(翻译自Coding-Geek文章)
本文翻译自Coding-Geek文章:< How does a relational database work>. 原文链接:http://coding-geek.com/how-dat ...
- 关系型数据库工作原理-事务管理(二)(翻译自Coding-Geek文章)
本文翻译自Coding-Geek文章:< How does a relational database work>. 原文链接:http://coding-geek.com/how-dat ...
- 关系型数据库工作原理-查询优化器之索引(翻译自Coding-Geek文章)
本文翻译自Coding-Geek文章:< How does a relational database work>.原文链接:http://coding-geek.com/how-data ...
- 关系型数据库工作原理-数据特征统计分析(翻译自Coding-Geek文章)
本文翻译自Coding-Geek文章:< How does a relational database work>.原文链接:http://coding-geek.com/how-data ...
- 关系型数据库工作原理-数据库整体框架(翻译自Coding-Geek文章)
本文翻译自Coding-Geek文章:< How does a relational database work>.原文链接:http://coding-geek.com/how-data ...
- 关系型数据库工作原理-高速缓存(翻译自Coding-Geek文章)
本文翻译自Coding-Geek文章:< How does a relational database work>. 原文链接:http://coding-geek.com/how-dat ...
- 关系型数据库工作原理-快速缓存(翻译自Coding-Geek文章)
本文翻译自Coding-Geek文章:< How does a relational database work>. 原文链接:http://coding-geek.com/how-dat ...
- 关系型数据库工作原理-时间复杂度(翻译自Coding-Geek文章)
本文翻译自Coding-Geek文章:< How does a relational database work>. 原文链接:http://coding-geek.com/how-dat ...
- 关系型数据库工作原理-归并排序(翻译自Coding-Geek文章)
本文翻译自Coding-Geek文章:< How does a relational database work>. 原文链接:http://coding-geek.com/how-dat ...
随机推荐
- 彻底理解 Android 中的阴影
如果我们想创造更好的 Android App,我相信我们需要遵循 Material Design 的设计规范.一般而言,Material Design 是一个包含光线,材质和投影的三维环境.如果我们想 ...
- bzoj 2120 带修改莫队
2120: 数颜色 Time Limit: 6 Sec Memory Limit: 259 MBSubmit: 7340 Solved: 2982[Submit][Status][Discuss] ...
- NJU 1010 Air
思路:把那张图打表(吐血...),然后就按照规则输出就行. AC代码 #include <cstdio> #include <cmath> #include <cctyp ...
- hdu 2045 递推
从n>=4开始考虑,只考虑n-1和1的颜色是否相等情况.推出公式F(n)=F(n-1)+2*F(n-2) AC代码: #include<cstdio> const int maxn= ...
- HDU - 2147 kiki's game 巴什博弈
思路:以终点(n, m)作为P态,倒推各个坐标的状态,最终得到结论:行数或列数是偶数就能赢,否则输. AC代码 #include <cstdio> #include < ...
- SpringBoot+Mybatis+PageHelper简化分页实现
前言 经过一段时间的测试和修改PageHelper插件逐渐走到了让我觉得靠谱的时候,它功能的就是简化分页的实现,让分页不需要麻烦的多写很多重复的代码. 已经加入我的github模版中:https:// ...
- MongoDB,子查询
//1.从sub(订单明细)对订单号分组,查询最多子订单的单号一条数据,重命名orderNo字段为num//2.根据这个sub.num(从结果集里获取第一条结果),查询main(主档表) db.mai ...
- 天猫精灵X1智能音箱使用感想
11.22音箱到手,等了刚好一个月. 主要是测评语音交互功能. 测试条件:正宗普通话. 1)问天气.温度:表现良好.2)找手机功能:试了多次,每次都说手机号码格式不对3)小孩听故事:正常.但是开头会有 ...
- c#(控制台应用程序)实现排序算法的研究总结
前言:闲来无事,便研究起来对数组的排序算法,怕过后遗忘,特地总结一下,也希望能帮到大家 概要: 总结的算法: 冒泡排序.插入排序.选择排序 要排序的一列数(从小到大): 1, 5, 3, 83, 4 ...
- 基于busybox的Linux小系统制作 (initrd)
我们有时候有需要在busybox基础上,制作linux,可是却不知道具体怎么做,这里将对基于busybox的linux小系统制作做出详细的步骤说明.准备环境:1.一个Redhat完整系统的虚拟机,本次 ...