Is the advantage of calling ensureindex in mongodb just speed? -


i've been reading ensureindex (mongodb: when call ensureindex?) , (pymongo / mongodb: create index or ensure index?) , mongodb documentation, havent come conclusion use of ensureindex. doesnt mongodb create id every document? why need index? in case have document this:

{     "name": "jon secada",     "date of birth": "09-19-1983",     "address": "1 chemin des loges",     "city": "versailles" } 

whats advantage of calling ensureindex on "name" example?

you gain more efficient searches on fields choose @ cost of additional memory , disk space consumed.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -