请问可否查看 SQL 语句访问了哪些region吗?

背景:
一个 id 为特定值的慢SQL

全表 group by 耗时3s
SELECT col_id,sum(money) as money FROM t where logtime >= ‘2022-08-23’ group by col_id;
18 rows in set (3.20 sec)

id为127慢:
SELECT col_id, sum(money) as money FROM t WHERE col_id = 127 AND logtime >= ‘2022-08-23’ group by col_id;
1 row in set (59.00 sec)
改写后更慢
select * from (SELECT col_id, sum(money) as money FROM t where logtime >= ‘2022-08-23’ group by col_id) as tmp_a where tmp_a.col_id = 127;
1 row in set (1 min 11.29 sec)

id为100快:
SELECT col_id, sum(money) as money FROM t WHERE col_id = 100 AND logtime >= ‘2022-08-23’ group by col_id;
1 row in set (3.40 sec)

表 t 为分区表,同时id为100的条目数比id为127的条目数要多,在 col_id 上有索引在查询时也利用上了该索引,这个群集后面也没加 TiFlash 之类的就 pd,tidb,tikv三个组件

所以怀疑是否是硬件性能问题,想看下 col_id = 127 的 region 分布在哪个 store 上。

trace select …

我试了下貌似看不见region信息,只能看见是哪个函数执行了多久,当前tidb版本为 4.0.13

贴下看看

内容见附件
trace.txt (759.6 KB)

那就是4.0的版本没有region_id