-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
-
None
-
None
-
None
-
None
-
None
-
None
-
None
For the compound NDV case for n fields, we store n + 1 sketches. One sketch for all-$expr semantics, and one sketch for each field i where that field has $eq semantics and the others $expr.
We should actually store n + 1 sketches, adding a sketch for the all-$eq variant. This was an oversight during the HLL design, because we thought callers would only be interested in compound NDV stats where at most 1 field uses $eq semantics. However, this call for NDV from INLJ costing code actually ideally wants NDV information with $eq semantics (because indexes do map null/missing to the same key).
We found that for TPC-E, that specific NDV call takes up to 1ms on average, which would almost entirely disappear if it could be served from a persisted HLL estimate.
- related to
-
SERVER-134541 Request NDV with $expr semantics in INLJ costing
-
- Backlog
-