| As a typical representative of NoSQL non-relational database,MongoDB database has a wide range of applications in many fields,especially in the Internet field,a large amount of information storage and data processing.Compared with traditional My SQL databases,MongoDB databases are more efficient and faster in dealing with large amounts of user information and data.However,after analysis and research,it is found that in the face of massive user information data access and storage,MongoDB also has problems such as low efficiency of original paging query data and easy overload of original load balancing.Based on the above questions,In order to improve the efficiency of MongoDB based database system in paging query and load balancing,This paper mainly does the following work:MongoDB’s paging query is a representative query method in database access query methods.When studying its own skip()+limit()access query method,it can be found that in the face of massive data processing,the query efficiency is seriously affected by its skip()method to scan a large amount of data,resulting in query efficiency and performance degradation.Therefore,on the basis of this problem,this paper introduces an improvement method to improve query performance in order to improve the efficiency of system query: the pagination improvement method based on keyword array.This method effectively avoids the use of the skip()method by retrieving the array of search keywords and then selecting the number of data that needs to be skipped through its subscript,that is,using the idea of space displacement time to improve query efficiency.MongoDB’s automatic sharding mechanism is associated with the load balancing of the server,and the automatic sharding mechanism that comes with the MongoDB system will lead to unbalanced data distribution and other related phenomena,so as to study the load balancing algorithm that comes with MongoDB,it is found that it is difficult to achieve the dynamic balance of data access in the actual sense: it only achieves a relative balance in the number of shards,and its cluster load does not reach a balanced state.Based on this,by querying the literature,in order to improve the performance of system load balancing,an improved algorithm based on access popularity is introduced: Dynamic load balancing is achieved through the added chunk block access popularity and node realtime load two indicator modules.Finally,set up the experimental environment and set the weights of the parameters related to the load of the master node.Then,the above load balancing algorithm and MongoDB’s original load balancing algorithm are experimentally compared and verified,and it is concluded that the algorithm can not only balance the load of the system well,but also reduce the response time of the system.The usability of the algorithm and its superiority compared with the performance of the original MongoDB load balancing algorithm are verified. |