Is it possible to query across multiple partitions? #3444
Replies: 2 comments 1 reply
-
Hi @marcelomachado, i hadn't that use case yet, but as far as i understand the docs at https://docs.couchdb.org/en/stable/api/partitioned-dbs.html#db-partition-partition-all-docs:
Just using the usual endpoints should allow you to query documents ignoring partition borders. With other words, as long as you don't reduce the subset of queried documents either using the |
Beta Was this translation helpful? Give feedback.
-
Hi @florianb thank you for the answer. I will try to be more clear to see if we are aligned. Using partitions is desirable for my application mainly considering scalability. I use partition to scope reduction, so we do not need to evaluate all documents. However, in some cases I need to get documents that are in different partitions and combine them. To do so, I currently need to make a query for each of the partitions. It is not interesting for me to query using the endpoint related to all_docs because in this case I lose the scope reduction feature. This implementation requires a number of I/O operations equivalent to the number of queries required to access each partition -- It is not good for performance. At a glance, considering the following dataset, my wish is to query all documents from
|
Beta Was this translation helpful? Give feedback.
-
I would like to query documents in multiple partitions. So, instead to use a string I would pass an array as a parameter.
I didn't find this ideia in the documentation, so I believe this might be a misunderstanding on my part. So my question is, why doesn't that make sense as a desirable feature?
Beta Was this translation helpful? Give feedback.
All reactions