In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article shows you what the database access optimization rules are, the content is concise and easy to understand, and can definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
There are many articles on the Internet to introduce the knowledge of database optimization, but most of the articles only explain a certain aspect, but for us programmers, this kind of introduction can not grasp the optimization knowledge very well. because many introductions are only optimized for some specific scenarios, they sometimes mislead or make programmers feel mysterious about database optimization.
Many programmers always ask questions such as how to learn database optimization and whether there are good teaching materials. I have also seen a lot of professional books on database optimization in the bookstore, but I feel that they are more oriented to DBA or PL/SQL development knowledge, and I feel that they are not suitable for ordinary programmers. The master of database optimization can not be achieved in a few weeks or months, not because of how advanced the database optimization is, but because on the one hand, you need to have a very good technical foundation. On the other hand, you need to spend a lot of time testing and summarizing specific databases.
A brief introduction to the rules of Database access Optimization
To optimize SQL correctly, we need to quickly locate the bottleneck of functionality, that is to say, where is the main cost of our SQL? In most cases, the slowest performance of the device will be the bottleneck, such as downloading when the network speed may be the bottleneck, local copy of files when the hard drive may be the bottleneck, why these general work we can quickly identify the bottleneck, because we have some basic understanding of the performance data of these slow devices, such as the network bandwidth is 2Mbps, the hard drive is 7200 revolutions per minute, and so on. .
According to the basic performance index of the current computer hardware and the main operation contents in the database, we can sort out the basic performance optimization rules as follows:
This optimization rule is summarized into five levels:
1. Reduce data access (reduce disk access)
2. Return less data (reduce network transmission or disk access)
3. Reduce the number of interactions (reduce network transmission)
4. Reduce server CPU overhead (reduce CPU and memory overhead)
5. Use more resources (increase resources)
Because the optimization rule of each layer is to solve the performance problems of its corresponding hardware, the proportion of performance improvement is also different. The traditional database system design is also to provide optimization methods for low-speed equipment as far as possible, so there are more optimization methods for low-speed equipment, and the optimization cost is lower. Any of our SQL performance optimizations should follow this rule from top to bottom to diagnose problems and propose solutions, rather than increasing resources to solve problems in the first place.
The above is what the database access optimization rules are, and have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
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.