mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-10 13:11:32 +00:00
Merge branch 'pt-tcs-where-option-using-non-optimal-index-lp1576036' of github.com:percona/percona-toolkit into pt-tcs-where-option-using-non-optimal-index-lp1576036
This commit is contained in:
@@ -6560,7 +6560,8 @@ sub _find_best_index {
|
||||
}
|
||||
}
|
||||
|
||||
if (!$best_index && !$want_index) {
|
||||
|
||||
if (!$best_index) {
|
||||
PTDEBUG && _d('Auto-selecting best index');
|
||||
foreach my $index ( $tp->sort_indexes($tbl_struct) ) {
|
||||
if ( $index eq 'PRIMARY' || $indexes->{$index}->{is_unique} ) {
|
||||
|
@@ -541,6 +541,7 @@ sub _find_best_index {
|
||||
}
|
||||
|
||||
# still no best index? select amongst all candidates.
|
||||
|
||||
if (!$best_index) {
|
||||
PTDEBUG && _d('Auto-selecting best index');
|
||||
foreach my $index ( $tp->sort_indexes($tbl_struct) ) {
|
||||
|
Reference in New Issue
Block a user