同where条件,有的查询走索引(IndexLookup),有的时候扫表(TableReader)

以下是tidb_slow_query.log的日志

select * from objects where bucketname='test' and name='Thumbnails/img2021/0319/0828158e.jpg';
# Time: 2022-12-06T17:42:25.922607919+08:00
# Txn_start_ts: 437864292124983326
# User@Host: root[root] @ 172.15.104.247 [172.15.104.247]
# Conn_ID: 55490
# Query_time: 27.998234246
# Parse_time: 0.000012787
# Compile_time: 0.000254719
# Rewrite_time: 0.000072921
# Cop_time: 27.942105545 Process_time: 415.546 Wait_time: 0.332 Request_count: 859 Total_keys: 254780341 Process_keys: 254775997
# DB: yig
# Is_internal: false
# Digest: 8e443b2ca62a8b5d75388a297da66ed3f020a0065d60caae6db17a132a36966e
# Stats: gc:437864279070212131
# Num_cop_tasks: 859
# Cop_proc_avg: 0.483755529 Cop_proc_p90: 0.555 Cop_proc_max: 0.839 Cop_proc_addr: 172.15.104.241:20160
# Cop_wait_avg: 0.000386495 Cop_wait_p90: 0.001 Cop_wait_max: 0.003 Cop_wait_addr: 172.15.104.242:20160
# Mem_max: 11133148
# Prepared: true
# Plan_from_cache: false
# Has_more_results: false
# KV_total: 416.411025455
# PD_total: 0.000002569
# Backoff_total: 0
# Write_sql_response_total: 0.000018356
# Succ: true
# Plan: tidb_decode_plan('vwfAMAkxNV84CTAJNTAJeWlnLmdjLm10aW1lOmRlc2MsIG9mZnNldDowLCBjb3VudDo1MAEpBSHgMjcuOTk2MDc3NzIycywgbG9vcHM6MwkxMC41OTE0Njg4MTEwMzUxNTYgTUIJTi9BCjEJMzFfMTcJBWxEZGF0YTpUb3BOXzE2CTQwNTUwGVYcNTM3OTQ2ODkVVgg4M
TIBgfBbcF90YXNrOiB7bnVtOiA4NTksIG1heDogODQwLjE3MTAxN21zLCBtaW46IDUxMC43MzbCtXMsIGF2ZzogNDg0Ljc3NTk0OG1zLCBwOTU6IDU5MC44MDAyNzhtcywBSlhfcHJvY19rZXlzOiAzNTU0OTEsIHA5NTYXACA0MTI5LCB0b3QFFyg6IDZtNTUuNTQ2cwkVIHdhaXQ6IDMzMgFUDHJwY18J
rAg3MywFDiU6ATQENi4BSRQ3MzYxMnMF3HhyX2NhY2hlX2hpdF9yYXRpbzogMC4wMH0JMjYuODUzIUkMMjUgSylLLDIJMTVfMTYJMV8wCaK5AT1mBDBuNVwYMCwgdGlrdilbEHtwcm9jIQsMOjgzOQHCOG1pbjowcywgcDgwOjUzNAETITwENTgFHihpdGVyczoyNDkzOCEUMGFza3M6ODU5fQlOL0EBBBg
KMwkxXzE1BacwMjU0NzkzMzQyCWxlKC5qAlgsIDIwMjItMTItMDYgMDk6MjQ6NDAuMAUBACkFNxAxNTI5NUkfhrkABDc3BaYuuQAINDgzFbkEMzUBC4K5ABg0CTEwXzE0OroAZHRhYmxlOmdjLCBrZWVwIG9yZGVyOmZhbHNlBagQNzQwMzGiqAAANUaoAAQ2OAGdJWEEMTkBC4KoAA==')
# Plan_digest: 62c16bc589067c967847e02f0e69d05dff227531c22874ede526fa204a76e77b