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

How to solve the problem of slow running of cloud database MongoDB

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article introduces how to solve the problem of slow running of cloud database MongoDB. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.

The Aliyun database team cracked the reason for the slow running of the cloud database MongoDB. The biggest culprit was the index.

How important is an index to a database?

The purpose of the index is to improve query efficiency, analogous dictionary, if we want to look up the word "mysql", we definitely need to locate the m letter, then find the y letter from the bottom down, and then find the rest of the sql. If there is no index, then you may need to look through all the words to find what you want, of course, the index of the database is much more complex than this.

Generally speaking, one of the main purposes of the index is to speed up the method of searching the data in the table, and it can also help information searchers to find the auxiliary data structure of ID records that meet the restrictions as soon as possible.

There is nothing wrong with the advantages of indexes, but if they are not used properly, they will slow down the database. When using Ali Cloud Database MongoDB, users often fail to add indexes or use inappropriate indexes, resulting in poor database performance and affecting business usage. The poor performance of the database is characterized by slow query statements or timeout, and high CPU utilization.

Based on this, Aliyun MongoDB launched the index recommendation feature to help users find slow queries that missed indexes or used inappropriate indexes, and provide optimal indexes for these slow queries to achieve the goal of improving database performance.

Under the premise that the audit log is open, index diagnostic reports for the last 3 days (a report from 0: 00 to 24:00 every day, a total of 3) can be generated by default. The contents of the report for more than 3 days are not retained.

According to their own needs, or monitoring data, users customize and analyze the slow query and index recommendation report at any time in the last 3 days.

Recommended procedure for indexing:

1. Log in to the MongoDB management console and locate the target instance.

two。 Click the instance ID or manage to go to the basic information page.

3. In the left navigation bar, select CloudDBA- > recommended index to view the list of index diagnostic reports, as shown in the following figure.

Cdn.com/371297308aa8e8cc1ec4efad22bed1646bae9ac5.png ">

4. Click Custom Analysis to open the Custom Analysis dialog box, where you can set the query time to view the index diagnosis report within a specific period of time. 


5. Click View details after an index list to view the diagnostic details of the specified index.

6. Click the query details after the collection list in the figure above to open the analysis details window. You can view the recommended indexes and merge recommended indexes and other details. 


It is reported that the index recommendation function temporarily supports East China 1, East China 2, South China 1, North China 1, North China 2. Index recommendation is supported for MongoDB replica sets and cluster instances, but not for single-node instances.

This is the end of how to solve the problem of slow running of cloud database MongoDB. I hope the above content can be of some help and learn more knowledge. If you think the article is good, you can share it for more people to see.

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

Internet Technology

Wechat

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

12
Report