CouchDB view is extremely slow

Viewed 8506

I have a CouchDB (v0.10.0) database that is 8.2 GB in size and contains 3890000 documents.

Now, I have the following as the Map of the view

function(doc) {emit([doc.Status], doc);

And it takes forever to load (4 hours and still no result).

Here's some extra information that might help describing the situation:

  1. The view is not a temp view. The view is defined before the 3890000 documents are inserted.

  2. There isn't anything on the server. It is a ubuntu box with nothing but the defaults installed.

  3. I see that my CPU is moving and working hard (sometimes shoots to 100%). The memory is moving as well but not increasing.

So my question is:

  1. What is actually happening in the background?
  2. Is this a "one time" thing where I have to wait once and it will somehow works later?
2 Answers
Related