In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Today, I will talk to you about the logical structure of MySQL, which may not be well understood by many people. in order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.
The first layer, the service layer (for client services): do connection processing for requests, authorization authentication, security, etc.
1. The query for each connection is completed on a thread in a process.
two。 The server is responsible for caching threads, so the service layer does not need to create a new thread for each connection.
Note: mysql5.5 or newer versions provide an API that supports the thread pool (thread-pooling) plug-in, which can use a small number of threads in the pool to serve a large number of connections. (similar to the shared connection method in oracle)
The second layer, core layer: query parsing, analysis, optimization, caching, providing built-in functions; stored procedures, triggers, views.
1. The optimizer does not care what storage engine is used, but the storage engine has an impact on optimizing queries.
two。 Before parsing the query, the server "asks" if the query is cached (only SELECT statements and corresponding results can be cached). The cached results are returned directly, while the uncached ones need to parse the query, optimize, and re-execute the returned results.
3. An internal data structure (parsing tree) is created when the query is parsed, and then various optimizations are made.
The third layer, the storage engine layer, not only stores and extracts data, but also does transaction processing for special data engines.
1. The server communicates with the storage engine through API, and the interface shields the differences between different storage engines, which makes the upper layer query transparent.
two。 There is no communication between different storage engines, only simple requests for upper-layer services.
After reading the above, do you have any further understanding of the logical architecture of MySQL? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.