[Serialization] How does a relational database work? (9)-mysql tutorial

Source: Internet
Author: User
Query management in the query manager is an indicator for determining whether a database is powerful or not. Through query management, you can convert a bad query statement into a piece of code that can be executed quickly. after the code is executed, the result is returned to the client manager. The entire process is divided into multiple steps: the query is first parsed and its validity is checked; the query is rewritten and unnecessary operations are deleted.

Query management in the query manager is an indicator for determining whether a database is powerful or not. Through query management, you can convert a bad query statement into a piece of code that can be executed quickly. after the code is executed, the result is returned to the client manager. The entire process is divided into multiple steps: the query is first parsed and its validity is checked; the query is rewritten and unnecessary operations are deleted.

Query Manager

Query management is an indicator for determining whether a database is powerful or not. Through query management, you can convert a bad query statement into a piece of code that can be executed quickly. after the code is executed, the result is returned to the client manager. The entire process is divided into multiple steps:

  • The query is first parsed and its validity is checked;
  • Rewrite the query and delete unnecessary operations, and make some pre-optimization;
  • To improve performance, make necessary optimizations and finally convert them into an execution plan;
  • Compile the execution plan;
  • Finally, run the execution plan.

After reading this chapter, if you want to have a better understanding of query optimization, I recommend that you read the following materials:

  • The first paper on cost optimization published in 1979: Access Path Selection in a Relational Database Management System. This paper has only 12 pages and can be understood as long as it has an intermediate level in computer science.
  • In-depth introduction to how to optimize queries in DB 9.x: DB2 for Linux, UNIX, and Windows Optimizer.
  • A detailed introduction to how PostgreSQL optimizes queries: Explaining the Query Optimizer. This article is very easy to understand, because it does not introduce PostgreSQL algorithms, but shows PostgreSQL's query plan.
  • SQLite official optimization Documentation: The SQLite Query Planner. It is easy to understand, and you are very simple to optimize the rules for SQLite; but it only explains how the optimizer works.
  • SQL Server 2005 optimization Query introduction: Understanding Query Processing and Query Plans in SQL Server
  • Orcale 12c optimization White Paper: Optimizer with Oracle Database 12c
  • The author of database system concepts has two theoretical courses on Query Optimization. they mainly focus on disk IO: Chapter 12: Query Processing and Chapter 13: Query Optimization.
  • There is also a theoretical course I found that is easier to understand and only describes join operations and disk IO: Datenbanksysteme II: Implementation of Database Systems

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.