Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Mysql architecture detailed explanation

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The following content mainly brings you a detailed explanation of mysql architecture. The knowledge mentioned here, which is slightly different from books, is summed up by professional and technical personnel in the process of contact with users, and has a certain value of experience sharing. I hope to bring help to the majority of readers.

Mysql architecture description

Field meaning description

Connectors: database connector

Native C API:C connection database interface

JDBC:Java connection database driver

ODBC: open database interconnection

.net: .net connection database driver

PHP:PHP connection database driver

Perl:Perl connection database driver

Python:Python connection database driver

Ruby:Ruby connection database driver

Cobol:Cobol connection database driver

Connection Pool:

MySQL is a single-process multithreaded working mode, so a thread pool must be maintained. Manage a large number of threads to respond concurrently to a large number of client concurrent requests.

Authentication: authentication, user name, password, etc.

Thread Reuse: thread reuse. When a user connection request comes in, a thread is needed to respond. When the user exits, the thread is not destroyed, but cleaned up and returned to the idle thread in the thread pool)

Connection Limits: the size of the thread pool determines the upper limit of the number of concurrent connections.

Check Memory: thread memory check

Caches: thread cache.

SQL Interface: similar to mysql's shell,SQL command interpreter, supports procedural programming, supports views, stored procedures, stored functions, triggers, parsing syntax problems, and so on.

Parser:SQL statement parser, does not analyze syntax problems, carries on the sentence execution analysis. Query translation, which converts a query statement into a corresponding recognizable statement that can be performed locally. Analysis is to have access to an object, and so on.

Optimizer: responsible for checking multiple paths and the cost of each path, evaluating the cost (the calculation of the cost depends on indexes, dynamic production statistics, internal components, etc.). Generate statistics and so on.

Some storage engines of Caches&Buffers:MySQL load the frequently accessed hot data into memory, which is easy for users to access memory directly. So MySQL needs to maintain a Caches&Buffers.

Pluggable Storage Engines:

Plug-in storage engine. MyISAM, InnoDB, NDB, Archive, Memory, etc., storage causes the conversion of the specific analysis results (Optimizer) to complete the path access to the files on disk.

The storage engine needs to map statements to disk blocks and load them into memory.

FileSystem: physical view, at the operating system level, MySQL data is stored as files.

Files&Logs:

Redo: redo log

Undo: undo log

Data: data fil

Index: index fil

Binary: binary log fil

Error: error log

Query and Slow: query log and slow query log

Simplify the architecture description

Process description:

1. Various clients are processed by the connection thread through the connector. The creation, management and destruction of load connection threads.

two。 After the user issues the statement, it is analyzed by the analyzer. If it is a query statement, go directly to the query cache.

3. If you hit, return directly, if you miss. Continue to hand it over to the optimizer.

4. After the optimization is completed, the storage engine is responsible for the corresponding file system and gets the relevant data. Loaded into memory, the corresponding rows or qualified rows are selected by the storage engine.

For the above detailed explanation of mysql architecture, if you need to know more, you can continue to pay attention to the innovation of our industry, if you need to get professional answers, you can contact the pre-sale and after-sale on the official website. I hope this article can bring you some knowledge updates.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report