-
Maheedhar PV authored
disable limit optimization) Bug#31686878 - BACKPORT MAIN BUG 30348211 TO RELEASE 5.7 The optimization to switch from a non-ordering index to an ordering index for group by and order by when there is a limit clause makes wrong decisions for some queries for various reasons. This patch introduces an optimizer switch that enables users to disable this optimization if the switch to ordering index results in a bad plan. The name of the switch is "prefer_ordering_index". By default the switch is on which means if an ordering index is found to be better than an already chosen plan then optimizer will switch to the ordering index. However if "prefer_ordering_index" is set to off, the switch to ordering index because of the "limit optimization" will not happen, resulting in optimizer picking the original plan which could have been using a filtering index. Change-Id: I511c586ac820cea8a63156299c08ee2213295130
Maheedhar PV authoreddisable limit optimization) Bug#31686878 - BACKPORT MAIN BUG 30348211 TO RELEASE 5.7 The optimization to switch from a non-ordering index to an ordering index for group by and order by when there is a limit clause makes wrong decisions for some queries for various reasons. This patch introduces an optimizer switch that enables users to disable this optimization if the switch to ordering index results in a bad plan. The name of the switch is "prefer_ordering_index". By default the switch is on which means if an ordering index is found to be better than an already chosen plan then optimizer will switch to the ordering index. However if "prefer_ordering_index" is set to off, the switch to ordering index because of the "limit optimization" will not happen, resulting in optimizer picking the original plan which could have been using a filtering index. Change-Id: I511c586ac820cea8a63156299c08ee2213295130
Loading