mysql Architecture Overview

mysql logic architecture

 

First layer: connection processing, certification authority, and other security verification.

When a client (application) to connect to mysql server, the server will use to create a thread for processing connection (a small amount of thread services a large number of connection), then the server needs to authenticate the connection, authentication is based on user name, the original host of information and password. If you are using a secure socket (ssl) is connected, you can also use certificate authentication. Once the client connection is successful, the server will continue to verify that the client has permission to perform a particular query (for example, whether to allow the client to perform user database table p2p update operation)

Second layer: core service functions in this layer, including query parsing, analysis, optimization, caching, and all built-in functions (for example: date and time, mathematics and encryption), across all storage engine functions are realized in this layer: Storage procedures, triggers, views, and so on.

Mysql parses the query and creates internal data structures (parse tree), and then subjected to various optimizations, including rewrite the query, determines the reading order of the tables, and select the appropriate indexes. Users can use the optimizer to resolve understand the optimization process, the associated configuration and operation, the implementation of more efficient.

Third layer: storage engine.

The storage engines to store and extract data mysql. MySQL storage engine defines a set of abstract API, via API server communicates with the storage engine, implemented by the storage engine API, which interfaces the differences between the shield storage engines that are transparent to these differences between different storage engines. Storage Engine API contains dozens underlying function, for performing such a transaction opening, a row of data extraction operation or the like according to the master key. Storage engine does not resolve sql

 

Guess you like

Origin www.cnblogs.com/pianzhi/p/11371715.html