Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

228
Vistas
Does using a partial index over a regular field index affect overall insert performance for mongo collections?

I want to implement a partial index that indexes a subset of documents in my collection where documents in this subset contain a shared field not used in other documents outside the subset. Call this shared field "subset_field".

I know that using a partial index reduces the size of the index in memory, but when I want to insert new documents that do not have the shared "subset_field", will the partial index slow down the insert operation as much as a regular field index would?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

The documentation on partial indexes only mentions insertation in regards of unique fields:

A partial index with a unique constraint does not prevent the insertion of documents that do not meet the unique constraint if the documents do not meet the filter criteria.

But the doc on Write Op Performance does have a big note saying

MongoDB only updates a sparse or partial index if the documents involved in a write operation are included in the index.

So, the partial index is being used to check if it applies to the document but if it doesn't apply then the index update is skipped hence your performance improves.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda