mysql composition

mysql

Record learning geek mysql special study notes

1. The composition of mysql

Insert picture description here
MySQL can be divided into two parts: Server layer and storage engine layer.

The Server layer includes connectors, query caches, analyzers, optimizers, executors, etc., covering most of the core service
functions of MySQL , as well as all built-in functions (such as date, time, math and encryption functions, etc.), all cross-storage engines All functions are
implemented in this layer, such as stored procedures, triggers, views, and so on.
The storage engine layer is responsible for data storage and extraction. Its architecture model is plug-in, supporting
multiple storage engines such as InnoDB, MyISAM, and Memory. The most commonly used storage engine is InnoDB, which has become the
default storage engine since MySQL 5.5.5 .
The connector is
mainly to connect to the client and update your login authority every time you log in

Query cache
Look up from the cache, and all kv pairs are stored in the connector. This method is not recommended because the hit rate is very low. The query cache is directly deleted in version 8.0

The analyzer
analyzes whether the grammar of the sql statement is correct and whether the table has corresponding content.

Optimizer The
optimizer decides which index to use when there are multiple indexes in a table; or when a statement has multiple table associations (join), it decides the connection order of each table

The executor
first judges whether it has permission to open, and then calls the interface provided by the engine to execute the query.

Guess you like

Origin blog.csdn.net/f_a_ker/article/details/113759422