2024-10-17Mongodb 性能监控工具FreeMonitoring,mongostat,mongotop,Profiler,索引,分片,事务超时,MongoDB调优db.users.createIndex({username:'hashed'})1#创建唯一索引db.values.createIndex({title:1},{unique:true})2#复合索引支持唯一性约束db.values.createIndex({title:1,type:1},{unique:true})3#多键索引支持唯一性约束db.inventory.createIndex({ratings:1},{uni