db.collection.validate()

db.collection.validate()
参数:
  • full (Boolean) – Optional. Specify true to enable a full validation. MongoDB disables full validation by default because it is a potentially resource intensive operation.

Provides a wrapper around the validate database command. Call the db.collection.validate() method on a collection object, to validate the collection itself. Specify the full option to return full statistics.

The validation operation scans all of the data structures for correctness and returns a single document that describes the relationship between the logical collection and the physical representation of that data.

The output can provide a more in depth view of how the collection uses storage. Be aware that this command is potentially resource intensive, and may impact the performance of your MongoDB instance.

也可以参考

集合验证数据

MongoDB Manual (Index)

关于

生态系统

格式

资源