当前位置: 首页 > news >正文

postgresql第一篇:postgresql收到一条sql语句后做了什么

postgresql第一篇:postgresql收到一条sql语句后做了什么

询问chatgpt【在postgresql官方文档中,能不能看到关于postgresql如何执行一条sql语句的描述】,得到答案:

The query is parsed by the parser, rewritten by the rule system, planned/optimized by the planner, and finally executed by the executor.

第一步:解析器

第二步:重写器

第三步:优化器

第四步:执行器

第五步:存储引擎

第六步:返回结果

从Overview of PostgreSQL Internals开始读。