关系型数据库工作原理-数据库查询器(翻译自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 ...
随机推荐
- VS2015 (C/C++) 生成的程序,不能在server2008上运行
项目本来是为Linux下运行做的,但是客户环境需要在windows下运行,幸好用的一些库是跨平台的. 于是用vs2015编译. 然后就发现在2008上却运行时库,装了2015的运行时库后, 在运行,就 ...
- Sql Server 常用事务处理总结
在数据库操作中,常用事务写法: 1. 通过 @@error 判断一批sql 执行完毕,是否有异常. @@error 为系统变量,每次执行完 sql 都会返回一个数值, 0 表示 执行成功 ,非0 ...
- ajax上传图片chrome报错net::ERR_CONNECTION_RESET/net::ERR_CONNECTION_ABORTED
网上搜了一下,base64图片太大,tomcat对post请求大小有默认限制,要在tomcat配置文件server.xml 加一个:maxPostSize="0",0表示无限制 & ...
- Js比较对Object类型进行排序
<script> var data=[{name:"121",age:"18",year:"2018"},{name:" ...
- Apache服务器安装-apache已经卸载,如何删除注册在系统的服务
cmd进入windows的命令行客户端,执行:sc delete apache 注意:以管理员的身份删除,同理,此方法也可以删除其他类似的服务.例如sc delete MongoDB.
- python中__name__=='__main__'的作用
学习python语法的过程中碰到了__name__=='__main__',这里做个笔记. 作用 这段代码的作用就是让你写的脚本模块既可以导入到别的模块中用,另外该模块自己也可执行. 测试 先 ...
- HDU - 1847 巴什博弈
思路: 0 1 2 3 4 5 6 7 8 9 10 11 12 P N N P N N P N N P N N P 不难发现:当n为三的倍数时,KIKI ...
- SecureCRT + Tmux 分屏 高效开发
最近发现了SecureCRT的一些好玩的功能, 具体如下: 1. 发送消息到所有的终端 首先选中查看-->交互窗口 此时会看到下面出现一个输入窗口 然后, 右击选择"发送交互到所有标签 ...
- Linux传统Huge Pages与Transparent Huge Pages再次学习总结
Linux下的大页分为两种类型:标准大页(Huge Pages)和透明大页(Transparent Huge Pages).Huge Pages有时候也翻译成大页/标准大页/传统大页,它们都是Hu ...
- Android View绘制和显示原理简介
现在越来越多的应用开始重视流畅度方面的测试,了解Android应用程序是如何在屏幕上显示的则是基础中的基础,就让我们一起看看小小屏幕中大大的学问.这也是我下篇文章--<Android应用流畅度测 ...