关系型数据库工作原理-数据库查询器(翻译自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 ...
随机推荐
- 织梦默认编辑器 按下回车生成br标签改为生成p标签
找到文件 \include\ckeditor\config.js 把 config.enterMode = CKEDITOR.ENTER_BR; config.shiftEnterMode = CKE ...
- 记录一则fsck的简单案例
环境:RHEL 6.5 + ext4文件系统 我个人实验环境的一个虚拟机,开机时在Checking filesystems时,有报错: /dev/mapper/vg_linuxbase-lv_root ...
- CEF小白人系列2-DEV环境配置-Windows10+SDK+VS2015
以下资料整理来自CEF官方教学.作者做了翻译和整理.并会以一种重事件操作的方式来一点点入门. 3个问题: 在上一篇内容中我们了解了什么是CEF,能干些什么.必要的物理学习环境. 下面我们也是以带着问题 ...
- 一个简单的定时表达式(HH:mm:ss)解析
前言 为客户开发了一个日志监控程序,监听各频道是否正常工作.其中有一个功能是这样的,当所有频道正常运行一段时间后,语音提示值班人员系统运行正常.一开始,想法比较简单,设置了一个变量,在线程不断轮询的过 ...
- shell脚本比较字符串相等
昨天在定位一个bug的时候,需要些shell脚本,用到了字符串的比较,出了一个小问题,就搜索总结了一下. 第一种方法:-eq 对比字符串是否相等,我首先想到的就是 -eq,然而打印的结果不正确.各种e ...
- Tesseract OCR win 32位编译
https://github.com/tesseract-ocr/tesseract/wiki/Compiling 找到该标题:Develop Tesseract 按照上面的步骤执行即可,最后使用 v ...
- HDU - 3001 Travelling 状压dp + 三进制 [kuangbin带你飞]专题二
终于刷完搜索专题了. 题意:给定n个城市,每个城市参观不能超过两次,两个城市之间有道路通过需要花费X,求通过能所有城市的最小花费. 思路:每个城市有三个状态0,1,2,可用三进制存储所有城市的访问状态 ...
- 我的Java设计模式-单例模式
就算不懂设计模式的兄弟姐妹们,想必也听说过单例模式,并且在项目中也会用上.但是,真正理解和熟悉单例模式的人有几个呢?接下来我们一起来学习设计模式中最简单的模式之一--单例模式 一.为什么叫单例模式? ...
- R-CNN算法概要
参考论文:Rich feature hierarchies for accurate object detection and semantic segmentation 下载地址:https://a ...
- JavaScript函数的柯里化(currying)
转载请注明出处:http://www.cnblogs.com/shamoyuu/p/currying.html 什么是js函数的currying /柯里化? 说到js的柯里化,相信很多朋友都会头大.或 ...