Optimize multi-type query
The first object in the query array should be a
that the query plugin can use to select a continguous range of messages in one of its indexes.
$in can select a discontiguous range, which when used as the first query object results in slow queries. Since the message types selected share a common distinguishing prefix, we can use
$prefix to select them. Then a second
$filter object subsequently filters the results by the exact message types.
Note that if more message types are in the future added lexicographically between
patchboot-webapp, those will be included in the first filter. If there are a lot of such messages, it will slow down this query. This query could then be reimplemented using multiple calls to
optimizebranch · 1/20/2021, 12:00:08 AM
Built with git-ssb-web