Dear Nick, This means: If Q+N are large enough to distribute the data to all nodes, e.g. 120 nodes Q=40, N=3 Then the view-query: startkey=foobar&endkey=foobaz has to ask all 120 nodes?
If I use a partion-key, is it possible to distribute the partioned-view among multiple nodes? The docs say it should stay under 10GB. Cheers, Markus Am Mittwoch, dem 12.06.2024 um 13:54 -0400 schrieb Nick Vatamaniuc: > Another feature related to efficient view querying are > partitioneddatabases: > https://docs.couchdb.org/en/stable/partitioned-dbs/index.html.It's a > bit of a niche, as you'd need to have a good partition key, butaside > from that, it can speed up your queries as responses would be > comingfrom a single shard only instead of Q shards. > > > On Wed, Jun 12, 2024 at 1:30 PM Markus Doppelbauer< > [email protected]> wrote: > > Hi Nick,Thank you very much for your reply.This is exactly what we > > are lookingfor.There are so many DBs that store the secondary > > indexlocally(Cassandra, Aerospike, SyllaDB, ...)Thanks again for > > the answerMarcus > > > > Am Mittwoch, dem 12.06.2024 um 13:23 -0400 schrieb Nick Vatamaniuc: > > > Hi Marcus,The node handling the request only queries the nodes > > > with shardcopies ofthat database. In a 100 node cluster the > > > shards for thatparticulardatabase might be present on only 6 > > > nodes, depending on theQ and Nsharding factors, so it will query > > > 6 out 100 nodes. Forinstance, for N=3and Q=2 sharding factors, it > > > will first send N*Q=6requests, and wait untilit gets at least one > > > response for each of theQ=2 shard ranges. Thishappens very > > > quickly. Then, for the duration ofthe response, it will > > > onlystream responses from those Q=2 workers.So, to summarize for > > > a Q=2database, it will be a streaming responsefrom 2 workers. For > > > Q=4, from 4workers, etc...Cheers,-Nick > > > On Wed, Jun 12, 2024 at 1:00 PM Markus Doppelbauer< > > > [email protected]> wrote: > > > > Hello,Is the CouchDB-view a "global" or "local" index?For > > > > example, if acluster has 100 nodes, would the query askfor a > > > > single node - or100 > > > > nodes?/.../_view/posts?startkey="foobar"&endkey="foobaz"Best > > > > wishesMarcus
