Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CouchDB related problems #1

Open
furio opened this issue Jun 4, 2012 · 3 comments
Open

CouchDB related problems #1

furio opened this issue Jun 4, 2012 · 3 comments
Assignees

Comments

@furio
Copy link
Contributor

furio commented Jun 4, 2012

JIRA bug:
https://issues.apache.org/jira/browse/COUCHDB-1490

@furio
Copy link
Contributor Author

furio commented Jun 4, 2012

Comment from mailing list:

Hi Francesco,

CouchDB stores JSON in a native erlang format on disk. Retrieving this
(whether to process in a JS map/reduce view, or to send through to an
http client) requires transforming this into JSON text format. For big
docs, this can take a while, or even when piped into couchjs, break.
There's a couple of other people who have reported this type of issue
recently on the ML.

You could avoid this by using erlang views**, or you may check whether
you see the same issue in 1.1.1 which has a different (slower) JSON
parsing tool.

Could you open a JIRA ticket for this issue please, seeing as you have
a nice sample doc to share?

Some general points:
typically you can replace emit(doc.id, doc) with emit(null) in your view.
You can always use ?include_docs=true to return the full data files in
your query.
The id of any doc emitted is available "for free" so you don't need
the duplication.
This will make your view significantly smaller by orders of magnitude.

** erlang views run inside the erlang vm, without a trusted sandbox rm
-rf and worse are all possible. But its likely faster, less
limitations per above issue, and comes with less documentation too.
YMMV, don't forget to wear a seatbelt, and never ever run with
scissors.

A+
Dave

@ghost ghost assigned dario1089 Jun 5, 2012
@furio
Copy link
Contributor Author

furio commented Jun 7, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants