Tidb5.4.3 升级 6.5.2 部分出现执行非常缓慢SQL甚至执行失败

1、原Tidb5.4.3使用的Sql是正常的升级版本6.5.2后出现部分Sql执行非常缓慢甚至执行失败;
2、索引失效
3、查询关联查询 and CAST(a.customer_id AS SIGNED) = orders.user_id,不同数据类型之间查询非常慢导致执行失败
总结:目前定位只版本升级导致

相关sql:
select count(1)
from marketingpro.inquiry_paper_answer_summary a

left join orderpro.orders as orders
on a.order_no = orders.order_no
and CAST(a.customer_id AS SIGNED) = orders.user_id
where a.seller_id = 198
and a.activity_id = ‘814863245868335104’
and a.answer_time >= ‘2023-05-25 00:00:00’
and a.answer_time <= ‘2023-05-25 23:59:59’

show stats_healthy where table_name =“inquiry_paper_answer_summary”;
表健康度多少?
analyze table inquiry_paper_answer_summary; 执行过了吗

表健康度

Db_name,Table_name,Partition_name,Healthy
marketingpro,inquiry_paper_answer_summary,"",95

analyze table inquiry_paper_answer_summary; 目前没有做分析

执行一下analyze table 执行一下,重新收集统计信息试试

根据您提供的信息,这个问题可能是由于版本升级导致的。在 TiDB 6.5.2 中,可能会出现一些与 TiDB 5.4.3 不兼容的问题。您可以尝试使用 TiDB 6.5.2 中的新特性来优化您的查询,例如使用 TiDB 6.5.2 中的新索引类型,如全文索引、JSON 索引等。

此外,您提供的 SQL 中使用了 CAST 函数将 a.customer_id 转换为 SIGNED 类型,这可能会导致查询变慢。您可以尝试将 a.customer_id 的数据类型更改为 SIGNED 类型,以避免 CAST 函数的使用。

最后,您可以尝试使用 EXPLAIN ANALYZE 命令来分析查询计划,找出查询的瓶颈所在,并进行优化。例如,您可以使用索引来加速查询,或者调整 TiDB 配置来优化查询性能。

执行计划

Projection_73	2.30	root	""	sqlqmai.zm_stores.name, coalesce(Column#111, orderpro.order_refunds.order_no)->Column#495, case(not(isnull(Column#111)), orderpro.order_refunds.order_no, -)->Column#496, ifnull(orderpro.orders.pay_no, )->Column#497, ifnull(concat(`, orderpro.orders.third_pay_no), )->Column#498, orderpro.order_refunds.user_id, coalesce(orgcenterpro.org_shops.name, )->Column#499, coalesce(memberpro.member_level_card.level_name, -)->Column#500, ifnull(case(eq(orderpro.orders.pay_type, 0), 未支付, eq(orderpro.orders.pay_type, 1), 微信支付, eq(orderpro.orders.pay_type, 2), 支付宝支付, eq(orderpro.orders.pay_type, 4), 余额支付, eq(orderpro.orders.pay_type, 32), 实体卡支付, eq(orderpro.orders.pay_type, 16), 免支付, eq(orderpro.orders.pay_type, 8), 混合支付, eq(orderpro.orders.pay_type, 64), 未知, eq(orderpro.orders.pay_type, 10), 商家结算), 无)->Column#501, orderpro.order_items.item_name, ifnull(json_unquote(cast(json_extract(cast(orderpro.order_items.features, json BINARY), $.membershipCardCode), var_string(16777216))), 无)->Column#502, memberpro.member_paid_customer_attached.id, plus(0, cast(cast(div(cast(orderpro.order_items.item_price, decimal(10,0) BINARY), 100), var_string(5)), double BINARY))->Column#503, case(eq(memberpro.member_paid_customer_attached.get_way, 0), 首次购卡, eq(memberpro.member_paid_customer_attached.get_way, 1), 再次购卡, eq(memberpro.member_paid_customer_attached.get_way, 2), 续卡, eq(memberpro.member_paid_customer_attached.get_way, 3), 导入数据, eq(memberpro.member_paid_customer_attached.get_way, 4), 好友赠予, 未知)->Column#504, ifnull(json_unquote(cast(json_extract(cast(orderpro.orders.features, json BINARY), $.workWechatUserid), var_string(16777216))), 无)->Column#505, ifnull(json_unquote(cast(json_extract(cast(orderpro.orders.features, json BINARY), $.workStaffId), var_string(16777216))), 无)->Column#506, ifnull(json_unquote(cast(json_extract(cast(orderpro.orders.features, json BINARY), $.workStaffName), var_string(16777216))), 无)->Column#507, 1->Column#508, plus(0, cast(cast(div(Column#109, 100), var_string(5)), double BINARY))->Column#509, plus(0, cast(cast(div(Column#110, 100), var_string(5)), double BINARY))->Column#510, ifnull(plus(0, cast(cast(Column#112, var_string(5)), double BINARY)), 0)->Column#511, ifnull(orderpro.order_refunds.apply_reason, 无)->Column#512, case(not(isnull(Column#111)), 会员卡退款, 会员卡购买)->Column#513, coalesce(orderpro.order_refunds.deal_at, orderpro.orders.order_at)->Column#514, coalesce(date(orderpro.order_refunds.deal_at), date(orderpro.orders.order_at))->Column#515, case(isnull(Column#488), sqlqmai.zm_stores.name, concat(sqlqmai.zm_stores.name, -, coalesce(Column#488, )))->Column#516, coalesce(orgcenterpro.org_shops.name, sqlqmai.zm_stores.name)->Column#517, ifnull(orgcenterpro.org_shops.code, 无)->Column#518, coalesce(cast(orgcenterpro.org_shops.id, var_string(20)), 无)->Column#519, coalesce(if(eq(Column#113, ), <nil>, Column#113), Column#114, 无)->Column#520, 会员卡订单->Column#521, ifnull(memberpro.customer_base.username, 无)->Column#522, ifnull(memberpro.customer_base.mobile_phone, 无)->Column#523, case(not(isnull(Column#111)), orderpro.orders.order_at)->Column#524
└─Projection_74	2.30	root	""	orderpro.order_refunds.user_id, orderpro.order_refunds.order_no, orderpro.order_refunds.deal_at, orderpro.order_refunds.apply_reason, orderpro.orders.pay_no, orderpro.orders.third_pay_no, orderpro.orders.pay_type, Column#109, Column#110, orderpro.orders.order_at, orderpro.orders.features, Column#113, Column#114, Column#111, Column#112, memberpro.customer_base.mobile_phone, memberpro.customer_base.username, memberpro.member_level_card.level_name, memberpro.member_paid_customer_attached.id, memberpro.member_paid_customer_attached.get_way, sqlqmai.zm_stores.name, orgcenterpro.org_shops.id, orgcenterpro.org_shops.name, orgcenterpro.org_shops.code, orgcenterpro.org_shops.name, orderpro.order_items.item_name, orderpro.order_items.item_price, orderpro.order_items.features, Column#488
  └─IndexHashJoin_80	2.30	root	""	left outer join, inner:IndexLookUp_77, outer key:orderpro.order_refunds.order_no, inner key:orderpro.order_items.order_no, equal cond:eq(orderpro.order_refunds.order_no, orderpro.order_items.order_no)
    ├─HashJoin_90(Build)	1.01	root	""	left outer join, equal:[eq(orderpro.order_refunds.store_id, sqlqmai.zm_acl_organization_shops.shop_id)]
    │ ├─HashJoin_92(Build)	1.01	root	""	left outer join, equal:[eq(Column#586, Column#587)]
    │ │ ├─Projection_93(Build)	1.01	root	""	orderpro.order_refunds.user_id, orderpro.order_refunds.store_id, orderpro.order_refunds.order_no, orderpro.order_refunds.deal_at, orderpro.order_refunds.apply_reason, orderpro.orders.pay_no, orderpro.orders.third_pay_no, orderpro.orders.pay_type, Column#109, Column#110, orderpro.orders.order_at, orderpro.orders.features, Column#113, Column#114, Column#111, Column#112, memberpro.customer_base.mobile_phone, memberpro.customer_base.username, memberpro.member_level_card.level_name, memberpro.member_paid_customer_attached.id, memberpro.member_paid_customer_attached.get_way, sqlqmai.zm_stores.name, orgcenterpro.org_shops.id, orgcenterpro.org_shops.name, orgcenterpro.org_shops.code, json_extract(cast(cast(memberpro.customer_base.extra, json BINARY), json BINARY), $.multiStoreId)->Column#586
    │ │ │ └─Projection_94	1.01	root	""	orderpro.order_refunds.user_id, orderpro.order_refunds.store_id, orderpro.order_refunds.order_no, orderpro.order_refunds.deal_at, orderpro.order_refunds.apply_reason, orderpro.orders.pay_no, orderpro.orders.third_pay_no, orderpro.orders.pay_type, Column#109, Column#110, orderpro.orders.order_at, orderpro.orders.features, Column#113, Column#114, Column#111, Column#112, memberpro.customer_base.mobile_phone, memberpro.customer_base.username, memberpro.customer_base.extra, memberpro.member_level_card.level_name, memberpro.member_paid_customer_attached.id, memberpro.member_paid_customer_attached.get_way, sqlqmai.zm_stores.name, orgcenterpro.org_shops.id, orgcenterpro.org_shops.name, orgcenterpro.org_shops.code
    │ │ │   └─HashJoin_96	1.01	root	""	left outer join, equal:[eq(orderpro.order_refunds.order_no, memberpro.member_paid_customer_attached.order_no) eq(Column#573, memberpro.member_paid_customer_attached.customer_id)]
    │ │ │     ├─IndexJoin_101(Build)	1.00	root	""	left outer join, inner:TableReader_98, outer key:orderpro.order_refunds.store_id, inner key:orgcenterpro.org_shops.id, equal cond:eq(orderpro.order_refunds.store_id, orgcenterpro.org_shops.id)
    │ │ │     │ ├─IndexJoin_112(Build)	1.00	root	""	left outer join, inner:TableReader_109, outer key:orderpro.order_refunds.seller_id, inner key:sqlqmai.zm_stores.id, equal cond:eq(orderpro.order_refunds.seller_id, sqlqmai.zm_stores.id)
    │ │ │     │ │ ├─Projection_119(Build)	1.00	root	""	orderpro.order_refunds.user_id, orderpro.order_refunds.seller_id, orderpro.order_refunds.store_id, orderpro.order_refunds.order_no, orderpro.order_refunds.deal_at, orderpro.order_refunds.apply_reason, orderpro.orders.pay_no, orderpro.orders.third_pay_no, orderpro.orders.pay_type, Column#109, Column#110, orderpro.orders.order_at, orderpro.orders.features, Column#113, Column#114, Column#111, Column#112, memberpro.customer_base.mobile_phone, memberpro.customer_base.username, memberpro.customer_base.extra, memberpro.member_level_card.level_name, cast(orderpro.order_refunds.user_id, var_string(20))->Column#573
    │ │ │     │ │ │ └─HashJoin_122	1.00	root	""	left outer join, equal:[eq(Column#563, memberpro.customer_base.id)]
    │ │ │     │ │ │   ├─Projection_123(Build)	1.00	root	""	orderpro.order_refunds.user_id, orderpro.order_refunds.seller_id, orderpro.order_refunds.store_id, orderpro.order_refunds.order_no, orderpro.order_refunds.deal_at, orderpro.order_refunds.apply_reason, orderpro.orders.pay_no, orderpro.orders.third_pay_no, orderpro.orders.pay_type, Column#109, Column#110, orderpro.orders.order_at, orderpro.orders.features, json_unquote(cast(json_extract(cast(orderpro.order_refunds.features, json BINARY), $.handlersInfo.accountName), var_string(16777216)))->Column#113, json_unquote(cast(json_extract(cast(orderpro.order_refunds.features, json BINARY), $.handlersInfo.accountNumber), var_string(16777216)))->Column#114, Column#111, Column#112, cast(orderpro.order_refunds.user_id, var_string(20))->Column#563
    │ │ │     │ │ │   │ └─HashAgg_124	1.00	root	""	"funcs:sum(Column#662)->Column#109, funcs:sum(Column#663)->Column#110, funcs:group_concat(Column#664 separator "","")->Column#111, funcs:sum(Column#665)->Column#112, funcs:firstrow(Column#666)->orderpro.order_refunds.order_no, funcs:firstrow(Column#667)->orderpro.order_refunds.seller_id, funcs:firstrow(Column#668)->orderpro.order_refunds.store_id, funcs:firstrow(Column#669)->orderpro.order_refunds.user_id, funcs:firstrow(Column#670)->orderpro.order_refunds.apply_reason, funcs:firstrow(Column#671)->orderpro.order_refunds.features, funcs:firstrow(Column#672)->orderpro.order_refunds.deal_at, funcs:firstrow(Column#673)->orderpro.orders.pay_type, funcs:firstrow(Column#674)->orderpro.orders.pay_no, funcs:firstrow(Column#675)->orderpro.orders.third_pay_no, funcs:firstrow(Column#676)->orderpro.orders.order_at, funcs:firstrow(Column#677)->orderpro.orders.features"
    │ │ │     │ │ │   │   └─Projection_423	4.07	root	""	cast(orderpro.orders.total_amount, decimal(10,0) BINARY)->Column#662, cast(orderpro.orders.actual_amount, decimal(10,0) BINARY)->Column#663, orderpro.order_refunds.refund_no, round(div(cast(orderpro.order_refunds.refund_amount, decimal(10,0) BINARY), 100), 2)->Column#665, orderpro.order_refunds.order_no, orderpro.order_refunds.seller_id, orderpro.order_refunds.store_id, orderpro.order_refunds.user_id, orderpro.order_refunds.apply_reason, orderpro.order_refunds.features, orderpro.order_refunds.deal_at, orderpro.orders.pay_type, orderpro.orders.pay_no, orderpro.orders.third_pay_no, orderpro.orders.order_at, orderpro.orders.features
    │ │ │     │ │ │   │     └─IndexJoin_129	4.07	root	""	inner join, inner:IndexLookUp_128, outer key:orderpro.order_refunds.order_no, inner key:orderpro.orders.order_no, equal cond:eq(orderpro.order_refunds.order_no, orderpro.orders.order_no)
    │ │ │     │ │ │   │       ├─IndexLookUp_160(Build)	4.05	root	""	""
    │ │ │     │ │ │   │       │ ├─IndexRangeScan_157(Build)	8321.81	cop[tikv]	table:order_refunds, index:idx_seller_deal(seller_id, deal_at)	range:[214176 2023-05-20 00:00:00,214176 2023-05-26 00:00:00), [214177 2023-05-20 00:00:00,214177 2023-05-26 00:00:00), [214178 2023-05-20 00:00:00,214178 2023-05-26 00:00:00), [214179 2023-05-20 00:00:00,214179 2023-05-26 00:00:00), [215067 2023-05-20 00:00:00,215067 2023-05-26 00:00:00), keep order:false
    │ │ │     │ │ │   │       │ └─Selection_159(Probe)	4.05	cop[tikv]	""	eq(orderpro.order_refunds.status, 30), or(and(eq(orderpro.order_refunds.biz_type, 5), eq(orderpro.order_refunds.order_type, 13)), and(eq(orderpro.order_refunds.biz_type, 4), eq(orderpro.order_refunds.order_type, 5)))
    │ │ │     │ │ │   │       │   └─TableRowIDScan_158	8321.81	cop[tikv]	table:order_refunds	keep order:false
    │ │ │     │ │ │   │       └─IndexLookUp_128(Probe)	4.07	root	""	""
    │ │ │     │ │ │   │         ├─IndexRangeScan_126(Build)	4.07	cop[tikv]	table:tb, index:uniq_order_no_user_id(order_no, user_id)	range: decided by [eq(orderpro.orders.order_no, orderpro.order_refunds.order_no)], keep order:false
    │ │ │     │ │ │   │         └─TableRowIDScan_127(Probe)	4.07	cop[tikv]	table:tb	keep order:false
    │ │ │     │ │ │   └─MergeJoin_191(Probe)	482154681.00	root	""	left outer join, left key:memberpro.customer_base.id, right key:memberpro.customer_card.customer_id
    │ │ │     │ │ │     ├─IndexJoin_202(Build)	478378880.00	root	""	left outer join, inner:TableReader_199, outer key:memberpro.customer_card.level_id, inner key:memberpro.member_level_card.id, equal cond:eq(memberpro.customer_card.level_id, memberpro.member_level_card.id)
    │ │ │     │ │ │     │ ├─Projection_209(Build)	478378880.00	root	""	memberpro.customer_card.level_id, memberpro.customer_card.customer_id
    │ │ │     │ │ │     │ │ └─IndexLookUp_208	478378880.00	root	""	""
    │ │ │     │ │ │     │ │   ├─IndexFullScan_206(Build)	478378880.00	cop[tikv]	table:tc, index:idx_customerId(customer_id, group_id)	keep order:true
    │ │ │     │ │ │     │ │   └─TableRowIDScan_207(Probe)	478378880.00	cop[tikv]	table:tc	keep order:false
    │ │ │     │ │ │     │ └─TableReader_199(Probe)	478378880.00	root	""	data:TableRangeScan_198
    │ │ │     │ │ │     │   └─TableRangeScan_198	478378880.00	cop[tikv]	table:td	range: decided by [memberpro.customer_card.level_id], keep order:false
    │ │ │     │ │ │     └─Projection_197(Probe)	482154681.00	root	""	memberpro.customer_base.id, memberpro.customer_base.mobile_phone, memberpro.customer_base.username, memberpro.customer_base.extra
    │ │ │     │ │ │       └─IndexLookUp_196	482154681.00	root	""	""
    │ │ │     │ │ │         ├─IndexFullScan_194(Build)	482154681.00	cop[tikv]	table:tb, index:PRIMARY(id)	keep order:true
    │ │ │     │ │ │         └─TableRowIDScan_195(Probe)	482154681.00	cop[tikv]	table:tb	keep order:false
    │ │ │     │ │ └─TableReader_109(Probe)	1.00	root	""	data:TableRangeScan_108
    │ │ │     │ │   └─TableRangeScan_108	1.00	cop[tikv]	table:ki	range: decided by [orderpro.order_refunds.seller_id], keep order:false
    │ │ │     │ └─TableReader_98(Probe)	1.00	root	""	data:TableRangeScan_97
    │ │ │     │   └─TableRangeScan_97	1.00	cop[tikv]	table:k	range: decided by [orderpro.order_refunds.store_id], keep order:false
    │ │ │     └─TableReader_238(Probe)	7135415.00	root	""	data:TableFullScan_237
    │ │ │       └─TableFullScan_237	7135415.00	cop[tikv]	table:te	keep order:false
    │ │ └─Projection_239(Probe)	185275.00	root	""	orgcenterpro.org_shops.name, cast(orgcenterpro.org_shops.id, json BINARY)->Column#587
    │ │   └─TableReader_243	185275.00	root	""	data:TableFullScan_242
    │ │     └─TableFullScan_242	185275.00	cop[tiflash]	table:kj	keep order:false
    │ └─TableReader_410(Probe)	136384.00	root	""	data:ExchangeSender_409
    │   └─ExchangeSender_409	136384.00	mpp[tiflash]	""	ExchangeType: PassThrough
    │     └─Projection_408	136384.00	mpp[tiflash]	""	Column#488, sqlqmai.zm_acl_organization_shops.shop_id
    │       └─HashAgg_247	136384.00	mpp[tiflash]	""	group by:sqlqmai.zm_acl_organization_shops.shop_id, funcs:firstrow(Column#488)->Column#488, funcs:firstrow(sqlqmai.zm_acl_organization_shops.shop_id)->sqlqmai.zm_acl_organization_shops.shop_id
    │         └─ExchangeReceiver_407	137005.00	mpp[tiflash]	""	""
    │           └─ExchangeSender_406	137005.00	mpp[tiflash]	""	ExchangeType: HashPartition, Hash Cols: [name: sqlqmai.zm_acl_organization_shops.shop_id, collate: N/A]
    │             └─Projection_405	137005.00	mpp[tiflash]	""	Column#488, sqlqmai.zm_acl_organization_shops.shop_id
    │               └─HashJoin_401	137005.00	mpp[tiflash]	""	inner join, equal:[eq(sqlqmai.zm_acl_organization_shops.org_id, sqlqmai.zm_acl_organizations.id)]
    │                 ├─ExchangeReceiver_311(Build)	26135.00	mpp[tiflash]	""	""
    │                 │ └─ExchangeSender_310	26135.00	mpp[tiflash]	""	ExchangeType: Broadcast
    │                 │   └─Projection_268	26135.00	mpp[tiflash]	""	sqlqmai.zm_acl_organizations.id, concat(coalesce(Column#487, ), coalesce(Column#478, ), coalesce(Column#469, ), coalesce(Column#460, ), coalesce(Column#451, ), sqlqmai.zm_acl_organizations.name)->Column#488
    │                 │     └─HashJoin_269	26135.00	mpp[tiflash]	""	left outer join, equal:[eq(sqlqmai.zm_acl_organizations.pid, sqlqmai.zm_acl_organizations.id)]
    │                 │       ├─ExchangeReceiver_304(Build)	26135.00	mpp[tiflash]	""	""
    │                 │       │ └─ExchangeSender_303	26135.00	mpp[tiflash]	""	ExchangeType: HashPartition, Hash Cols: [name: sqlqmai.zm_acl_organizations.pid, collate: N/A]
    │                 │       │   └─HashJoin_270	26135.00	mpp[tiflash]	""	left outer join, equal:[eq(sqlqmai.zm_acl_organizations.pid, sqlqmai.zm_acl_organizations.id)]
    │                 │       │     ├─ExchangeReceiver_297(Build)	26135.00	mpp[tiflash]	""	""
    │                 │       │     │ └─ExchangeSender_296	26135.00	mpp[tiflash]	""	ExchangeType: HashPartition, Hash Cols: [name: sqlqmai.zm_acl_organizations.pid, collate: N/A]
    │                 │       │     │   └─HashJoin_271	26135.00	mpp[tiflash]	""	left outer join, equal:[eq(sqlqmai.zm_acl_organizations.pid, sqlqmai.zm_acl_organizations.id)]
    │                 │       │     │     ├─ExchangeReceiver_290(Build)	26135.00	mpp[tiflash]	""	""
    │                 │       │     │     │ └─ExchangeSender_289	26135.00	mpp[tiflash]	""	ExchangeType: HashPartition, Hash Cols: [name: sqlqmai.zm_acl_organizations.pid, collate: N/A]
    │                 │       │     │     │   └─HashJoin_272	26135.00	mpp[tiflash]	""	left outer join, equal:[eq(sqlqmai.zm_acl_organizations.pid, sqlqmai.zm_acl_organizations.id)]
    │                 │       │     │     │     ├─ExchangeReceiver_283(Build)	26135.00	mpp[tiflash]	""	""
    │                 │       │     │     │     │ └─ExchangeSender_282	26135.00	mpp[tiflash]	""	ExchangeType: HashPartition, Hash Cols: [name: sqlqmai.zm_acl_organizations.pid, collate: N/A]
    │                 │       │     │     │     │   └─HashJoin_273	26135.00	mpp[tiflash]	""	left outer join, equal:[eq(sqlqmai.zm_acl_organizations.pid, sqlqmai.zm_acl_organizations.id)]
    │                 │       │     │     │     │     ├─ExchangeReceiver_276(Build)	26135.00	mpp[tiflash]	""	""
    │                 │       │     │     │     │     │ └─ExchangeSender_275	26135.00	mpp[tiflash]	""	ExchangeType: HashPartition, Hash Cols: [name: sqlqmai.zm_acl_organizations.pid, collate: N/A]
    │                 │       │     │     │     │     │   └─TableFullScan_274	26135.00	mpp[tiflash]	table:ta	keep order:false
    │                 │       │     │     │     │     └─ExchangeReceiver_281(Probe)	26135.00	mpp[tiflash]	""	""
    │                 │       │     │     │     │       └─ExchangeSender_280	26135.00	mpp[tiflash]	""	ExchangeType: HashPartition, Hash Cols: [name: sqlqmai.zm_acl_organizations.id, collate: N/A]
    │                 │       │     │     │     │         └─Projection_278	26135.00	mpp[tiflash]	""	sqlqmai.zm_acl_organizations.id, sqlqmai.zm_acl_organizations.pid, concat(sqlqmai.zm_acl_organizations.name, -)->Column#451
    │                 │       │     │     │     │           └─TableFullScan_279	26135.00	mpp[tiflash]	table:zm_acl_organizations	keep order:false
    │                 │       │     │     │     └─ExchangeReceiver_288(Probe)	26135.00	mpp[tiflash]	""	""
    │                 │       │     │     │       └─ExchangeSender_287	26135.00	mpp[tiflash]	""	ExchangeType: HashPartition, Hash Cols: [name: sqlqmai.zm_acl_organizations.id, collate: N/A]
    │                 │       │     │     │         └─Projection_285	26135.00	mpp[tiflash]	""	sqlqmai.zm_acl_organizations.id, sqlqmai.zm_acl_organizations.pid, concat(sqlqmai.zm_acl_organizations.name, -)->Column#460
    │                 │       │     │     │           └─TableFullScan_286	26135.00	mpp[tiflash]	table:zm_acl_organizations	keep order:false
    │                 │       │     │     └─ExchangeReceiver_295(Probe)	26135.00	mpp[tiflash]	""	""
    │                 │       │     │       └─ExchangeSender_294	26135.00	mpp[tiflash]	""	ExchangeType: HashPartition, Hash Cols: [name: sqlqmai.zm_acl_organizations.id, collate: N/A]
    │                 │       │     │         └─Projection_292	26135.00	mpp[tiflash]	""	sqlqmai.zm_acl_organizations.id, sqlqmai.zm_acl_organizations.pid, concat(sqlqmai.zm_acl_organizations.name, -)->Column#469
    │                 │       │     │           └─TableFullScan_293	26135.00	mpp[tiflash]	table:zm_acl_organizations	keep order:false
    │                 │       │     └─ExchangeReceiver_302(Probe)	26135.00	mpp[tiflash]	""	""
    │                 │       │       └─ExchangeSender_301	26135.00	mpp[tiflash]	""	ExchangeType: HashPartition, Hash Cols: [name: sqlqmai.zm_acl_organizations.id, collate: N/A]
    │                 │       │         └─Projection_299	26135.00	mpp[tiflash]	""	sqlqmai.zm_acl_organizations.id, sqlqmai.zm_acl_organizations.pid, concat(sqlqmai.zm_acl_organizations.name, -)->Column#478
    │                 │       │           └─TableFullScan_300	26135.00	mpp[tiflash]	table:zm_acl_organizations	keep order:false
    │                 │       └─ExchangeReceiver_309(Probe)	26135.00	mpp[tiflash]	""	""
    │                 │         └─ExchangeSender_308	26135.00	mpp[tiflash]	""	ExchangeType: HashPartition, Hash Cols: [name: sqlqmai.zm_acl_organizations.id, collate: N/A]
    │                 │           └─Projection_306	26135.00	mpp[tiflash]	""	sqlqmai.zm_acl_organizations.id, concat(sqlqmai.zm_acl_organizations.name, -)->Column#487
    │                 │             └─TableFullScan_307	26135.00	mpp[tiflash]	table:zm_acl_organizations	keep order:false
    │                 └─Selection_266(Probe)	137005.00	mpp[tiflash]	""	not(isnull(sqlqmai.zm_acl_organization_shops.shop_id))
    │                   └─TableFullScan_265	137005.00	mpp[tiflash]	table:oms	keep order:false
    └─IndexLookUp_77(Probe)	2.30	root	""	""
      ├─IndexRangeScan_75(Build)	2.30	cop[tikv]	table:om, index:idx_order_no(order_no)	range: decided by [eq(orderpro.order_items.order_no, orderpro.order_refunds.order_no)], keep order:false
      └─TableRowIDScan_76(Probe)	2.30	cop[tikv]	table:om	keep order:false

好的 正在收集计划

最后是为啥呢。。。