git ssb

0+

farewellutopia-dev / patchboot



Optimize multi-type query

%KnfsXpRr3UY3WyIZwZsFJRCWJZpkTbHux3L6J6laebU=.sha256
Closed cel-desktop wants to merge commits into master from optimize
cel-desktop · 1/19/2021, 1:19:44 AM

Optimize multi-type query

The first object in the query array should be a $filter object 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-app and 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 query.read.

farewellutopia-dev deleted the optimize branch · 1/20/2021, 12:00:08 AM
%9OZKNJCCVgaBD5InICTfXCJA73nv/Ww5H5qDkWR91g8=.sha256 farewellutopia-dev closed this pull request · 1/20/2021, 12:00:20 AM

Built with git-ssb-web