Method HasNarrowConjunct(FilterExpression?, IReadOnlyDictionary<string, FieldInfo>)

Assembly: redb.Core.Pro.dll

Whether the top-level AND of the filter holds a leaf that is narrow by its shape (score of at
least ; two half-lines on one field merge into a closed range
first). Under OR or NOT a leaf does not narrow the set of objects, so only the top level counts.
Used by PostgreSQL to drop the OFFSET 0 fence of the streams form. With the fence the filter
is checked above the streams after every object of the scheme has been joined: 2.4 s for one
order number among 689 thousand points. Without it PostgreSQL pushes a narrow leaf down to the
index of values: 31 ms. On a wide filter without the fence it underestimates the streams about
fifteen times and builds hash joins of 35-43 MB each, hence the fence stays for those.
The score is by the shape of the leaf, not by the data: an equality that matches half of the
scheme counts as narrow.

public static bool HasNarrowConjunct(FilterExpression? filter, IReadOnlyDictionary<string, FieldInfo> fields)