- Reference >
- Database Commands >
- validate
validate¶
-
validate¶ The
validatecommand 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:This command will validate the contents of the collection named
users. You may also specify one of the following options:full: trueprovides a more thorough scan of the data.scandata: falseskips the scan of the base collection- without skipping the scan of the index.
The
mongoshell also provides a wrapper:Use one of the following forms to perform the full collection validation:
Warning
This command is resource intensive and may have an impact on the performance of your MongoDB instance.