Significant Improvements to Indexes in MongoDB v2.0

I have upgraded my MongoDB installation to version 2.0 today and converted existing indexes to {v:1} format. According to the release notes, “Indexes are often 25% smaller and 25% faster (depends on the use case)”.

> db.hashes.totalIndexSize()
> db.hashes.runCommand( "compact" )
{ "ok" : 1 }
> db.hashes.totalIndexSize()

In my case, a more than 10 GB database, the totalIndexSize of {v:1} format indexes is reduced by more than 40% to only 59.45% of the size of the old {v:0} format indexes. Well done, MongoDB developers!