Closed aligusnet closed 1 year ago
Actually, last last request: can you update the numbers in the PR with the larger document size? The numbers look quite similar in most cases. I'm surprised that the plans would result in such similar throughputs.
@alyacb Do you mean that not all the tests demonstrated performance boost with the heuristics? It really depends not on the document size, but on how the data distributed. I can imagine, that in some cases, e.g. for the query {a: 1, b: 1, c: 1}
and the indexes {a: 1, b: 1}
and {c: 1}
we would prefer {a: 1, b: 1}
, but {c: 1}
might be more selective, and instead of the performance improvement we get performance degradation. There are similar issues with CE, sometimes CE can give misleading results and poorer performance.
@aligusnet I'm surprised none of the tests above show any significant difference (>10%) in throughput, except for this one, where tie breaking is doing better, as expected:
TieBreaking.Equality
8 53.38707500884039
Regular.Equality
8 21.28536077650503
I want to be sure that:
@alyacb What I wanted to demonstrate here is that the heuristics did not make the plans worse in the cases when they shouldn't (in other words not too expensive to apply) and that sometimes they can give performance boost.
If you believe that only cases with performance boost count I can remove others. Only predicates with inequalities allow to demonstrate reliable performance boost because they can guarantee order of the documents. In queries with equalities only we cannot guarantee the order and, therefore, cannot guarantee that we always demonstrate performance improvement,
@alyacb I have replaced the equality tests with inequality once to better demonstrate performance boosts
The test results in op/sec. with the tie breaking knob enabled and disabled.