In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
 
            
                     
                
2025-10-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
[TOC]
Slow query / / Open slow query record db.setProfilingLevel for more than 2000 milliseconds (1j2000) / / View the last five slow query show profile// query db.system.profile.find (). Sort ({'millis':-1}). Pretty// View query Plan db.Sync_Log.find ({"$and": [{"mbid": {$eq 7542163}}) {'tasking: {$gte:2333}). Explain () / close slow query record db.setProfilingLevel (0) Task Management stops queries db.currentOp () .inprog.forEach (function (item) {if (item.secs_running > 1000) db.killOp (item.opid)) }) stop querying a table db.currentOp () .inprog.forEach (function (item) {if (item.ns = = "dbA.tbA") db.killOp (item.opid)}) find some type of task db.currentOp () .inprog.forEach (function (item) {if (item.op== "query") {print (item.opid,item.op)) }}) another way of thinking is to view db.currentOp ({$and: [{ns: {$ne:'local.oplog.rs'}}, {ns: {$ne:'local.replset.minvalid'}}, {ns: {$ne:'admin.$cmd'}}) {ns: {$ne:''}) replica set management modify hostname cfg = rs.conf () cfg.members [0] .host = "xxxhost: 20000" cfg.members [1] .host = "yyyhost: 20001" cfg.members [2] .host = "zzzhost: 20002" rs.reconfig (cfg) shard management modify primary shard
When a MongoDB sharding cluster creates a database, the system selects a node with the largest amount of available space as its default node.
Db.runCommand ({"movePrimary": "test", "to": "shard0000"}) manually migrate the data blocks of the collection
Purpose: pre-migrate data when a node needs to be offline
Sh.moveChunk ("dbA.collectionB", {collC: "53187"}, "shard0019")
If there is an error
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.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about

The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r


A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from

Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





                    First, add dependency 
 Wechat 
             
                About us
                 Contact us
                 Product review
                 car news
                 thenatureplanet
        
                 
                 
     
More Form oMedia:
               
AutoTimes.
Bestcoffee.
SL News.
Jarebook.
Coffee Hunters.
Sundaily.
Modezone.
NNB.
Coffee.
Game News.
FrontStreet.
GGAMEN
 © 2024 shulou.com SLNews  company. All rights reserved.