-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
-
Fully Compatible
-
None
-
None
-
None
-
None
-
None
-
None
-
None
In the benchmarks we run the same query multiple times and we'd like to easily verify whether we pick the same join plan on each iteration or not.
We discussed a few potential options to detect this:
- Check the slow query logs
- Manually guess based on reported p50 & p99 latencies
- Add an improved plan summary field which captures the join plan shape
- Compare the QuerySolution hash
The last option seems to be the most promising, we can just compare the winning plan's solutionHash for each query. A potential problem is that the hash() implementation for the join nodes uses the default implementation, which means only the stage type and the children are encoded in the hash. We might need to override the hash() implementation to include things like leftEmbeddingField and rightEmbeddingField.