cloudant / java-cloudant

A Java client for Cloudant
Apache License 2.0
79 stars 68 forks source link

performace tunning parameters in cloudant DB and java api level #454

Closed umashanker088 closed 6 years ago

umashanker088 commented 6 years ago

Please read these guidelines before opening an issue.

Bug Description

1. How to increase the application performance so that can you share some important tuning parameters or approach

Currently we are using spring boot application in which integrate Cloudant db using Cloudant java libraries

There are two approach to use for get data in list from db such as

  1. View
  2. db.find call
  3. db.find query
  4. db.contains ( method taking more time so ware plan to move all check call via view call)

I am fully confused so that kindly suggest me which is best approach use for get list of data or single document from db

Cloudant lib : 1.9.0

tomblench commented 6 years ago

I can't make any specific recommendations without more detailed information.

If you know the document ID and you want to fetch one document, then use one of the find methods.

If you know the document IDs and you want to fetch a large number of documents, then use an AllDocsRequestBuilder, in conjunction with the keys method. (The last example in the list shows the use of keys).

Which version of java-cloudant are you using? You say you are using 1.9.0 but there is no such version. Do you mean 2.9.0?

umashanker088 commented 6 years ago

Thanks Ok fine but how to check document present in db if we can use contains method its will take more time. How to update some attributes without fetch to respective document with id and if we can use updatehandler some time we getting 500 internal server type of error so what i can do?
Sorry we are using 2.9.0 cloudant java lib.

tomblench commented 6 years ago
emlaver commented 6 years ago

Closing as stale, please reopen if you require further assistance.