Skip to content

Commit cbda2c9

Browse files
planner: use index for binding cache update (#59993)
ref #51347
1 parent d884a4d commit cbda2c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/bindinfo/binding_cache.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func (u *bindingCacheUpdater) LoadFromStorageToCache(fullLoad bool) (err error)
6060
timeCondition = ""
6161
} else {
6262
lastUpdateTime = u.lastUpdateTime.Load().(types.Time)
63-
timeCondition = fmt.Sprintf("WHERE update_time>'%s'", lastUpdateTime.String())
63+
timeCondition = fmt.Sprintf("USE INDEX (time_index) WHERE update_time>'%s'", lastUpdateTime.String())
6464
}
6565
condition := fmt.Sprintf(`%s ORDER BY update_time, create_time`, timeCondition)
6666
bindings, err := readBindingsFromStorage(u.sPool, condition)

0 commit comments

Comments
 (0)