Reputation: 5251
Let's say I have some data in a CouchDB database. The overall size is about 100K docs.
I have a _design doc which stores a 'get all entities' view.
Assuming the requests are done on a local machine against a local database:
curl -X GET http://127.0.0.1/mydb/_design/myexample/_view/all
entities = Entity.view('mydb/all’)
Does 1
have to perform any additional calculations compared to 2
(JSON encoding/decoding, HTTP request parsing, etc.) and how can that affect the performance of querying 'all' entities from the database?
I guess that directly querying the database (option 2) should be faster than wrapping request/response into JSON, but I am not sure about that.
Upvotes: 2
Views: 211
Reputation: 1122222
Under the API covers, Couchdbkit uses the restkit
package, which is a REST library.
In other words, Couchdbkit is a pythonic API to the CouchDB REST API, and will do the same amount of work as using the REST API yourself.
Upvotes: 4