I have a mongo db collection that is updated (a new record is added) once a second. Will it suffice to call ensure_index ONCE on the index attribute or do I have to call it repeatedly - for example after each document is added?
I understand that ensure_index looks at the last time it was invoked and potentially re-indexes the collection. What I fail to understand is why this should be necessary in my case ( or rather I don't know if this is necessary in my case). If the order of indexing or index attribute is not changing over time, do I need to repeatedly call ensure_index once for each time a new document is added?