Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
advisor: fix included column order in suggested indexes
If an index optimizes multiple quals, the previous code wasn't deterministic and could append the columns from the included quals in any order, which could lead to a non optimal index suggestion. To fix, the include quals are not emitted in ascending order of column they contains, so there's a guarantee that the first columns are in the correct order. The result is still not fully deterministic in case of a single qual having multiple columns not included in a child qual, but this doesn't really matter as the order is not significant there (at least from the advisor point of view). Thanks to disqus user Sivan for the report.
- Loading branch information