【复现路径】 tikv升级完成后,先升级一个tiflash,之后发现tiflash查询结果不一致
tikv 查询结果正常,后面把tiflash全部升级完成后,把有问题的表重新tiflash同步 后正常
【问题现象及影响】
结果不一致
异常时
SELECT own_appid,COUNT(1),SUM(cost) FROM tbl_new_ad_cost WHERE create_time>=‘2022-03-29’ AND create_time<‘2022-03-30’ GROUP BY own_appid ORDER BY 1
own_appid count(1) sum(cost)
1092 1043 39102.390
1093 253 24.360
1095 280 273.840
SELECT own_appid,COUNT(1),SUM(cost) FROM tbl_new_ad_cost WHERE create_time>=‘2022-03-29’ AND create_time<‘2022-03-30’ GROUP BY own_appid ORDER BY 1
own_appid count(1) sum(cost)
1092 543 19102.390
1093 153 14.360
1095 148 172.240
稳定之后
SELECT own_appid,COUNT(1),SUM(cost) FROM tbl_new_ad_cost WHERE create_time>=‘2022-03-29’ AND create_time<‘2022-03-30’ GROUP BY own_appid ORDER BY 1
own_appid count(1) sum(cost)
1092 1043 39102.390
1093 253 24.360
1095 280 273.840
你好,能找到出问题的这条 SQL 的执行计划吗?
SELECT own_appid,COUNT(1),SUM(cost) FROM tbl_new_ad_cost WHERE create_time>=‘2022-03-29’ AND create_time<‘2022-03-30’ GROUP BY own_appid ORDER BY 1
这个慢查询没有了, 看这个SQL吧。 29号查28号的数据, 数据不会变。所有tiflash副本数都是2
SELECT own_appId ,sum(cost) costSum from tbl_new_ad_cost where day = ‘2022-03-28’ group by own_appId 执行计划.txt (9.3 KB)