incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Christian <adam.christ...@gmail.com>
Subject View performance issue
Date Wed, 26 May 2010 00:53:09 GMT
Hello everyone,

I have a "conf" db with the following documents:

(env)(db) [17:38] sauce $curl localhost:5984/conf/_all_docs
{"total_rows":8,"offset":0,"rows":[
{"id":"_design/amis","key":"_design/amis","value":{"rev":"1-d210474cd70114aa12a9a0a45e5d0f20"}},
{"id":"_design/takos","key":"_design/takos","value":{"rev":"1-e35bbf33d4b29a86eb60fafbab7aa42c"}},
{"id":"ami-a5b559cc","key":"ami-a5b559cc","value":{"rev":"1-5f08c036a73967cb6b72fd0e580a4b84"}},
{"id":"ami-a9e90fc0","key":"ami-a9e90fc0","value":{"rev":"1-3f3a5d33f3db78c971ceade5c6a2b960"}},
{"id":"ami-cf608da6","key":"ami-cf608da6","value":{"rev":"1-9c8c728402e151e0ad39e67909fd6af9"}},
{"id":"ami-db608db2","key":"ami-db608db2","value":{"rev":"1-5d5683582b4c513536c0a05fe4d494a0"}},
{"id":"ami-dd608db4","key":"ami-dd608db4","value":{"rev":"1-7187ff6b10fad61c79ed2c0cbf64b374"}},
{"id":"expediter","key":"expediter","value":{"rev":"1-9b56984574a38d0c69e33abb055ea3e6"}}
]}

There's a view called "amis/active" which says:
curl localhost:5984/conf/_design/amis | jsonpretty
{
   "_rev": "1-d210474cd70114aa12a9a0a45e5d0f20",
   "_id": "_design/amis",
   "language": "javascript",
   "filters": {},
   "views": {
       "active": {
           "map": "function(doc)\n{\n  if ((doc.doc_type ==
\"ChefAMI\" || doc.doc_type == \"AMI\") && doc.active) {\n
emit(doc._id, doc);\n  }\n}"
       }
   }
}


However when I run the view:
   curl localhost:5984/conf/_design/amis/_view/active

It just hangs and "beam.smp" takes 10-14% CPU.

CouchDB 0.11, Ubuntu 10.4

Any ideas would be greatly appreciated!

Adam Christian

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message