发布于 2015-09-14 15:05:59 | 184 次阅读 | 评论: 0 | 来源: 网络整理

validate

The validate command checks the contents of a namespace by scanning a collection’s data and indexes for correctness. The command can be slow, particularly on larger data sets:

{ validate: "users" }

This command will validate the contents of the collection named users. You may also specify one of the following options:

  • full: true provides a more thorough scan of the data.

  • scandata: false skips the scan of the base collection

    without skipping the scan of the index.

The mongo shell also provides a wrapper:

db.collection.validate();

Use one of the following forms to perform the full collection validation:

db.collection.validate(true)
db.runCommand( { validate: "collection", full: true } )

警告

This command is resource intensive and may have an impact on the performance of your MongoDB instance.

最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务