In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "how many layers are there in the logical architecture of mysql". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
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.
This is the end of the content of "how many layers of mysql logical architecture". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.