|
It is important to note that MySQL is a single-process multithreaded structure, and each user request creates a thread response.
The thread that processes the user's request then orders the command to the Management module , and the command management module will parse the command, and if the command does not have a syntax error, it will pass the post analysis to the cache module be cached for the next use. At the same time, a log module is logged.
After the command Manager is processed, commands are sent to the command parser, such as the SELECT statement, which is optimized within MySQL, such as a query table, and a table definition module to determine the table and field information.
The access control module further checks to see if the user has permission to manipulate an object in the database and, if so, to the Table Manager , the table Manager notifies the storage engine to complete the physical operation.
In fact, there are three levels of relational databases: Presentation Layer (Relationship)--"logical layer (storage engine)--" Physical layer (file)
We see various database objects in the database, such as tables, views, and so on, to be reflected in the file. This process is done by the storage engine. For MySQL, it is support plug-in storage engine, more commonly used there are two, one is MyISAM, one is InnoDB. In simple terms, MyISAM performance is good, but does not support transactions, for more queries of the system is very suitable, such as Data Warehouse. And InnoDB is a support business, is a work very similar to Oracle, more suitable for online transaction systems.
|