views:

241

answers:

2

If the number of documents is more will the querying of data gets slower in CouchDB?

Example Scenario:

  • I have a combobox in a form for customer name. When the user types the customer name, I have to do autofilling.
  • There will be around 10k customer documents in the CouchDB. I understand that i have to create a view to do the same.
  • CouchDB database is in the local machine where the application resides.

Question: Will it take more than 2 - 3 seconds to query the DB for matching customer names? Will querying take more time for each query if there are many documents in the CouchDB (say around 100000 documents)?

Any pointers on how to create views/index will be helpful.

Thanks in advance.

A: 

for me too it's really slow. switch to mongo or cassandra

Obvious -1. Answer not helpful.
Mike Daniels
map/reduce is incremental and the btree is persisted, a query that is already built returns immediately, what are you doing?
mikeal
clearly no clue
arcticpenguin
+5  A: 

The view runs on every document, but only once. After that, the document's view value(s) are stored forever. Fetching a customer by name will be very fast because you would normally have only a few new documents to process in the view at query time.

Query time will not increase noticeably if you have more documents. Technically, access times grow logarithmically with the number of documents. However, in practice fetching documents is basically constant time and very unlikely to be a problem.

jhs