Query Manager
Query management is an indicator of whether a database is strong or not. With query management, you can convert a bad query statement into a fast-executing code that returns results to the client manager after the code executes. The whole process is divided into multiple steps:
- The query is parsed first and its validity is checked;
- Rewrite the query and delete unnecessary operations, and do some pre-optimization;
- In order to improve the performance of the necessary optimization, the final conversion to an execution plan;
- Compile the execution plan;
- Run the execution plan last.
After reading this section, if you would like to have a deeper understanding of query optimization, I recommend reading the following information:
- One of the earliest papers on cost-optimized: Access Path Selection in a relational Database Management System published in 1979. This paper only has 12 pages, as long as the computer science intermediate level can be understood.
- An in-depth introduction to how DB 9.X optimizes queries: DB2 for Linux, UNIX, and Windows Optimizer.
- A detailed description of how PostgreSQL optimizes queries: Explaining the Postgres query Optimizer. This is very easy to understand because it is not introduced from the PostgreSQL algorithmic perspective, but rather shows the PostgreSQL query plan.
- SQLite Official Optimization Document: The SQLite Query Planner. It's easy to read, it's easy to tune your rules for SQLite, but it just explains how the optimizer works.
- Introduction to SQL Server 2005 tuning queries: Understanding query Processing and query plans in SQL Server
- Orcale 12c Optimization whitepaper: Optimizer with Oracle Database 12c
- The author of DATABASE SYSTEM concepts two theoretical courses on query optimization, which focus on disk io:chapter 12:query processing, Chapter 13:query optimization
- There's another one I found easier to understand. A theoretical course on join operations and disk IO: Datenbanksysteme ii:implementation of Database Systems
How does a "serial" relational database work? (9)-Query Manager