Mango $lt
and $gt
operators are backed by inclusive key ranges
#4865
Labels
$lt
and $gt
operators are backed by inclusive key ranges
#4865
Mango index scans do not handle the
$lt
("less than") and$gt
("greater than") operators efficiently. In case of$lt
,inclusive_end=true
is always assumed, so e.g. if there was a selector equivalent toage < 20
, the key scanned would include20
and those documents would need filtering out in memory. Similarly, for$gt
, the start key is always inclusive, which cannot even be changed, i.e. there is noinclusive_start
option. This can cause a bigger impact on the performance of in-memory filtering if the count is high for the documents with the start and end keys.Investigate the possibilities for making the interval scan exclusive to cut down on the size of the set of elements forwarded for filtering.
The text was updated successfully, but these errors were encountered: