Reconstruyendo índices en Mongodb

Estoy leyendo sobre Mongodb's indexes for my Mongodb project

I am well aware that inserting data into a traditional relation database would cause a large slow down if the table was very large as the indexes are rebuilt.

If I choose to add indexes to Mongodb collections: Is rebuilding an index in Mongodb roughly as expensive as rebuilding an index in a traditional relational database? or does the fact that it uses a B-Tree for indexing improve rebuild time?

preguntado el 04 de julio de 12 a las 09:07

2 Respuestas

In MongoDB, as in other RDMBS, once you build an index, subsequent inserts, deletes, and updates will be slowed down.

The process of rebuilding is handled by MongoDB itself, but you can force a manual rebuild using db.myCollection.reIndex().

Respondido 31 Jul 13, 14:07

Rebuilding an index is just as expensive in Mongodb.

Note: traditional databases also use B-Trees.

Respondido 31 Jul 13, 14:07

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.