How to disable (temporary) indexes in MongoDB

Is it possible to suspend index maintenance in MongoDB in order to improve input speed and enable (or rebuild) indexes afterwards? According to the documentation, it looks like after providing the Index () index is supported in all subsequent inserts and updates.

+5
source share
1 answer

Indexes are updated synchronously with insert / update. Therefore, there is no way to "pause" this. If you expect a big batch insert, you can delete the index, perform the insert, and then rebuild the index. Of course, this has some consequences:

  • your queries will suffer from a missing index while you insert data.
  • ( )
+5

All Articles