I was looking at MongoDB. Good.
I added some indexes to the collection, loaded a bunch of data, and then deleted all the data, and I noticed that the indexes did not change size, similar to the behavior here .
If i call
db.repairDatabase()
indexes are then crushed to zero. Similarly, if I do not delete all the data, but call repairDatabase (), the indexes are a little compressed (perhaps because unused extensions are truncated?). I get an index of size from "totalIndexSize" from db.collection.stats ().
However, this takes a lot of time (I read that it can be hours in a large database). I do not understand how accessible the database is for reading or writing while it is running. I guess this is not so affordable.
Since I want to run as few mongod instances as possible, I want to learn more about how to manage indexes after deletion. Can someone point me to something or give any advice?
source share