Speed, CouchDB View and Alternatives

I have a large dataset that I want to query. The request does not change, but the underlying data is executed. From what I read, I could build a "view" and request it. In addition, I read that Couch DB knows how to update the view when the data changes, so I assume that querying the view will be fast again.

My questions are, do I understand the opinions of CounchDB correctly? I don’t need any other CouchDB function, I don’t even need SQL, all I need is a quick same query to change data. Can I use something else? If I used, say, the good old MySQL, it would be really slower than CouchDB (read: in the above script, how would different databases be executed?).

+3
source share
2 answers

I don’t think anyone can answer your question, given the information you provided.

Indexes in a relational database are similar to CouchDB views. In both cases, they store a pre-sorted instance of the data, and the database stores this instance in synchronization with canonical data. Both types of databases transparently use the index / view to speed up subsequent queries of the form for which the index / view was created.

Without indexes / views, queries must scan the entire collection of ndata records , and they run in O(n)time. When a query benefits from indexes / views, it executes on O(log n)time.

. ​​ , , . , X , Y. - .

+1

. !

, , , , emit() , , ?include_docs, include_docs CouchDB , . , emit() , , ( , ), ( , ).

+2

Source: https://habr.com/ru/post/1759423/


All Articles