tags:

views:

162

answers:

1

I have the following setup:

  • Mac Pro with 2 GB of RAM (yes, not that much)
  • MongoDB 1.1.3 64-bit
  • 8 million entries in a single collection
  • index for one field (integer) wanted

Calling .ensureIndex(...) takes more than an hour, actually I killed the process after that. My impression is, that it takes far too long. Also, I terminated the process but the index can be seen with .getIndexes() afterwards.

Anybody knows what is going wrong here?

+1  A: 

Adding an index on an existing data set is expected to take a while, as the entire BTree needs to be constructed. If you think this is taking an unreasonable amount of time, or you've seen a regression in performance the best bet is to ask about it on the list.

mdirolf