3.3.7版本 partitonSortSpill算子导致be无法响应

为了更快的定位您的问题,请提供以下信息,谢谢
【详述】问题详细描述

当集群设置query_pool_spill_mem_limit_threshold=0.3, 当集群内存使用比较高时, 执行以下sql, 会导致集群卡住. 排查时候发现的, 每次集群无法响应都是执行了这个sql, select count() from t1基本能跑, select * from t1 limit 200跑不了卡住, 应该是be的问题, 重启fe无法解决
目前发现好像是只有select会出现, insert into select 没有问题, 而且需要达到query_pool的阈值, 导致select中的sort算子被spill才会出现.

SELECT `cjsj` AS `cjsj`, `ddbh` AS `ddbh`, `ysdh` AS `ysdh`, `yszdh` AS `yszdh`, `zdysdh` AS `zdysdh`, `ddlb` AS `ddlb`, `zfzh` AS `zfzh`, `ckdbh` AS `ckdbh`, `ck` AS `ck`, `dp` AS `dp`, `ckdzt` AS `ckdzt`, `ckzt` AS `ckzt`,
       `fjxh` AS `fjxh`, `sjbm` AS `sjbm`, `hpbh` AS `hpbh`, `hpmc` AS `hpmc`, `hpjc` AS `hpjc`, `pp` AS `pp`, `fl` AS `fl`, `ggm` AS `ggm`, `ggmc` AS `ggmc`, `tm` AS `tm`, `hpsl` AS `hpsl`, `hpydj` AS `hpydj`, `hpyzje` AS `hpyzje`,
       `ddzyh` AS `ddzyh`, `ddyf` AS `ddyf`, `ftyf` AS `ftyf`, `hpcjj` AS `hpcjj`, `hpcjzj` AS `hpcjzj`, `hpzyh` AS `hpzyh`, `hdfkje` AS `hdfkje`, `ysje` AS `ysje`, `yghpcb` AS `yghpcb`, `hpcb` AS `hpcb`, `sjhpzcb` AS `sjhpzcb`,
       `khwm` AS `khwm`, `shr` AS `shr`, `shdq` AS `shdq`, `shdz` AS `shdz`, `sjrsj` AS `sjrsj`, `sjrdh` AS `sjrdh`, `wlgs` AS `wlgs`, `xkfp` AS `xkfp`, `bjmc` AS `bjmc`, `zdr` AS `zdr`, `ddy` AS `ddy`, `jhy` AS `jhy`,
       `dby` AS `dby`, `yhy` AS `yhy`, `fhy` AS `fhy`, `ywy` AS `ywy`, `dypc` AS `dypc`, `wlddyzt` AS `wlddyzt`, `fhddyzt` AS `fhddyzt`, `fjbcdyzt` AS `fjbcdyzt`, `fjbcbh` AS `fjbcbh`, `zfsj` AS `zfsj`, `xdsj` AS `xdsj`,
       `fhsj` AS `fhsj`, `rfq` AS `rfq`, `zpfs` AS `zpfs`, `mjly` AS `mjly`, `kfbz` AS `kfbz`, `dybz` AS `dybz`, `bz` AS `bz`, `bz1` AS `bz1`, `lyzhzbm` AS `lyzhzbm`, `lyzhzmc` AS `lyzhzmc`, `lyzhzsl` AS `lyzhzsl`,
       `ckbq` AS `ckbq`, `ddbq` AS `ddbq`, `dplsj` AS `dplsj`, `splm` AS `splm`, `xl` AS `xl`, `fz` AS `fz`, `zk` AS `zk`, `sl` AS `sl`, `cgfl` AS `cgfl`, `pddfl` AS `pddfl`, `hppp` AS `hppp`, `syxd` AS `syxd`, `hpsx4` AS `hpsx4`,
       `hpsx5` AS `hpsx5`, `cgfl1` AS `cgfl1`, `yxfl` AS `yxfl`, `zhzxl` AS `zhzxl`, `tsfl` AS `tsfl`, `zhzpddfl` AS `zhzpddfl`, `zdysje` AS `zdysje`, `yf` AS `yf`, `wldbh` AS `wldbh`, `zddygzl` AS `zddygzl`, `czjg` AS `czjg`,
       `ygyzcb` AS `ygyzcb`, `czygyz` AS `czygyz`, `pthpi` AS `pthpi`, `fxysdh` AS `fxysdh`, `fxsmc` AS `fxsmc`, `fxsbh` AS `fxsbh`, `mxdygzl` AS `mxdygzl`, `jsygyzcb` AS `jsygyzcb`, `jsczygyz`, `ddly` AS `ddly`,
       `sh` AS `sh`, `fc` AS `fc`, `spsx` AS `spsx`, `nj` AS `nj`, `cf2` AS `cf2`, `zcck1`
FROM (SELECT `cjsj`, `ddbh`, `ysdh`, `yszdh`, `zdysdh`, `ddlb`, `zfzh`, `ckdbh`, `ck`, `dp`, `ckdzt`, `ckzt`, `fjxh`, `sjbm`, `hpbh`, `hpmc`, `hpjc`, `pp`, `fl`, `ggm`, `ggmc`, `tm`, `hpsl`, `hpydj`, `hpyzje`, `ddzyh`,
             `ddyf`, `ftyf`, `hpcjj`, `hpcjzj`, `hpzyh`, `hdfkje`, `ysje`, `yghpcb`, `hpcb`, `sjhpzcb`, `khwm`, `shr`, `shdq`, `shdz`, `sjrsj`, `sjrdh`, `wlgs`, `xkfp`, `bjmc`, `zdr`, `ddy`, `jhy`, `dby`, `yhy`, `fhy`,
             `ywy`, `dypc`, `wlddyzt`, `fhddyzt`, `fjbcdyzt`, `fjbcbh`, `zfsj`, `xdsj`, `fhsj`, `rfq`, `zpfs`, `mjly`, `kfbz`, `dybz`, `bz`, `bz1`, `lyzhzbm`, `lyzhzmc`, `lyzhzsl`, `ckbq`, `ddbq`, `dplsj`, `splm`, `xl`,
             `fz`, `zk`, `sl`, `cgfl`, `pddfl`, `hppp`, `syxd`, `hpsx4`, `hpsx5`, `cgfl1`, `yxfl`, `zhzxl`, `tsfl`, `zhzpddfl`, `zdysje`, `yf`, `wldbh`, `zddygzl`, `czjg`, `ygyzcb`, `czygyz`, `pthpi`, `fxysdh`, `fxsmc`,
             `fxsbh`, `mxdygzl`, `jsygyzcb`, CAST(CAST(`jsczygyz` AS DOUBLE) AS VARCHAR) AS `jsczygyz`, `ddly`, `sh`, `fc`, `spsx`, `nj`, `cf2`, `zcck` AS `zcck1`
FROM (SELECT `cjsj`, `ddbh`, `ysdh`, `yszdh`, `zdysdh`, `ddlb`, `zfzh`, `ckdbh`, `zcck` AS `ck`, `dp`, `ckdzt`, `ckzt`, `fjxh`, `sjbm`, `hpbh`, `hpmc`, `hpjc`, `pp`, `fl`, `ggm`, `ggmc`, `tm`, `hpsl`, `hpydj`, `hpyzje`,
             `ddzyh`, `ddyf`, `ftyf`, `hpcjj`, `hpcjzj`, `hpzyh`, `hdfkje`, `ysje`, `yghpcb`, `hpcb`, `sjhpzcb`, `khwm`, `shr`, `shdq`, `shdz`, `sjrsj`, `sjrdh`, `wlgs`, `xkfp`, `bjmc`, `zdr`, `ddy`, `jhy`, `dby`, `yhy`,
             `fhy`, `ywy`, `dypc`, `wlddyzt`, `fhddyzt`, `fjbcdyzt`, `fjbcbh`, `zfsj`, `xdsj`, `fhsj`, `rfq`, `zpfs`, `mjly`, `kfbz`, `dybz`, `bz`, `bz1`, `lyzhzbm`, `lyzhzmc`, `lyzhzsl`, `ckbq`, `ddbq`, `dplsj`, `splm`,
             `xl`, `fz`, `zk`, `sl`, `cgfl`, `pddfl`, `hppp`, `syxd`, `hpsx4`, `hpsx5`, `cgfl1`, `yxfl`, `zhzxl`, `tsfl`, `zhzpddfl`, `zdysje`, `yf`, `wldbh`, `zddygzl`, `czjg`, `ygyzcb`, `czygyz`, `pthpi`, `fxysdh`, `fxsmc`,
             `fxsbh`, `mxdygzl`, `jsygyzcb`, CAST(((`$109` / CASE WHEN `w0$o0` > 0 THEN CAST(`w0$o1` AS DECIMAL(38, 8)) ELSE CAST(NULL AS DECIMAL(38, 8)) END) * `$110`) AS VARCHAR) AS `jsczygyz`, `ddly`, `sh`, `fc`, `spsx`,
             `nj`, `cf2`, `zcck1` AS `zcck`
FROM (SELECT `zcck`, `zcck1`, `cjsj`, `ddbh`, `ysdh`, `yszdh`, `zdysdh`, `ddlb`, `zfzh`, `ckdbh`, `dp`, `ckdzt`, `ckzt`, `fjxh`, `sjbm`, `hpbh`, `hpmc`, `hpjc`, `pp`, `fl`, `ggm`, `ggmc`, `tm`, `hpsl`, `hpydj`, `hpyzje`,
             `ddzyh`, `ddyf`, `ftyf`, `hpcjj`, `hpcjzj`, `hpzyh`, `hdfkje`, `ysje`, `yghpcb`, `hpcb`, `sjhpzcb`, `khwm`, `shr`, `shdq`, `shdz`, `sjrsj`, `sjrdh`, `wlgs`, `xkfp`, `bjmc`, `zdr`, `ddy`, `jhy`, `dby`, `yhy`,
             `fhy`, `ywy`, `dypc`, `wlddyzt`, `fhddyzt`, `fjbcdyzt`, `fjbcbh`, `zfsj`, `xdsj`, `fhsj`, `rfq`, `zpfs`, `mjly`, `kfbz`, `dybz`, `bz`, `bz1`, `lyzhzbm`, `lyzhzmc`, `lyzhzsl`, `ckbq`, `ddbq`, `dplsj`, `splm`,
             `xl`, `fz`, `zk`, `sl`, `cgfl`, `pddfl`, `hppp`, `syxd`, `hpsx4`, `hpsx5`, `cgfl1`, `yxfl`, `zhzxl`, `tsfl`, `zhzpddfl`, `zdysje`, `yf`, `wldbh`, `zddygzl`, `czjg`, `ygyzcb`, `czygyz`, `pthpi`, `fxysdh`,
             `fxsmc`, `fxsbh`, `mxdygzl`, `jsygyzcb`, `ddly`, `sh`, `fc`, `spsx`, `nj`, `cf2`, `$109`, `$110`, COUNT(`$109`) OVER (PARTITION BY `ddbh`) AS `w0$o0`, SUM(`$109`) OVER (PARTITION BY `ddbh`) AS `w0$o1`
FROM (SELECT `zcck`, `zcck1`, `cjsj`, `ddbh`, `ysdh`, `yszdh`, `zdysdh`, `ddlb`, `zfzh`, `ckdbh`, `dp`, `ckdzt`, `ckzt`, `fjxh`, `sjbm`, `hpbh`, `hpmc`, `hpjc`, `pp`, `fl`, `ggm`, `ggmc`, `tm`, `hpsl`, `hpydj`, `hpyzje`,
             `ddzyh`, `ddyf`, `ftyf`, `hpcjj`, `hpcjzj`, `hpzyh`, `hdfkje`, `ysje`, `yghpcb`, `hpcb`, `sjhpzcb`, `khwm`, `shr`, `shdq`, `shdz`, `sjrsj`, `sjrdh`, `wlgs`, `xkfp`, `bjmc`, `zdr`, `ddy`, `jhy`, `dby`, `yhy`,
             `fhy`, `ywy`, `dypc`, `wlddyzt`, `fhddyzt`, `fjbcdyzt`, `fjbcbh`, `zfsj`, `xdsj`, `fhsj`, `rfq`, `zpfs`, `mjly`, `kfbz`, `dybz`, `bz`, `bz1`, `lyzhzbm`, `lyzhzmc`, `lyzhzsl`, `ckbq`, `ddbq`, `dplsj`, `splm`,
             `xl`, `fz`, `zk`, `sl`, `cgfl`, `pddfl`, `hppp`, `syxd`, `hpsx4`, `hpsx5`, `cgfl1`, `yxfl`, `zhzxl`, `tsfl`, `zhzpddfl`, `zdysje`, `yf`, `wldbh`, `zddygzl`, `czjg`, `ygyzcb`, `czygyz`, `pthpi`, `fxysdh`,
             `fxsmc`, `fxsbh`, `mxdygzl`, `jsygyzcb`, `ddly`, `sh`, `fc`, `spsx`, `nj`, `cf2`, CAST(`mxdygzl` AS DECIMAL(38, 8)) AS `$109`, CAST(`ygyzcb` AS DECIMAL(38, 8)) AS `$110`
FROM (SELECT CASE WHEN `t6`.`zcck` IS NOT NULL THEN `t6`.`zcck` ELSE `ud_1kajdnaszf_xsckmxtjiyss`.`ck` END AS `zcck`, CASE WHEN `t6`.`zcck` IS NOT NULL THEN `t6`.`zcck` ELSE `ud_1kajdnaszf_xsckmxtjiyss`.`ck` END AS `zcck1`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`cjsj`, `ud_1kajdnaszf_xsckmxtjiyss`.`ddbh`, `ud_1kajdnaszf_xsckmxtjiyss`.`ysdh`, `ud_1kajdnaszf_xsckmxtjiyss`.`yszdh`, `ud_1kajdnaszf_xsckmxtjiyss`.`zdysdh`, `ud_1kajdnaszf_xsckmxtjiyss`.`ddlb`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`zfzh`, `ud_1kajdnaszf_xsckmxtjiyss`.`ckdbh`, `ud_1kajdnaszf_xsckmxtjiyss`.`dp`, `ud_1kajdnaszf_xsckmxtjiyss`.`ckdzt`, `ud_1kajdnaszf_xsckmxtjiyss`.`ckzt`, `ud_1kajdnaszf_xsckmxtjiyss`.`fjxh`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`sjbm`, `ud_1kajdnaszf_xsckmxtjiyss`.`hpbh`, `ud_1kajdnaszf_xsckmxtjiyss`.`hpmc`, `ud_1kajdnaszf_xsckmxtjiyss`.`hpjc`, `ud_1kajdnaszf_xsckmxtjiyss`.`pp`, `ud_1kajdnaszf_xsckmxtjiyss`.`fl`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`ggm`, `ud_1kajdnaszf_xsckmxtjiyss`.`ggmc`, `ud_1kajdnaszf_xsckmxtjiyss`.`tm`, `ud_1kajdnaszf_xsckmxtjiyss`.`hpsl`, `ud_1kajdnaszf_xsckmxtjiyss`.`hpydj`, `ud_1kajdnaszf_xsckmxtjiyss`.`hpyzje`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`ddzyh`, `ud_1kajdnaszf_xsckmxtjiyss`.`ddyf`, `ud_1kajdnaszf_xsckmxtjiyss`.`ftyf`, `ud_1kajdnaszf_xsckmxtjiyss`.`hpcjj`, `ud_1kajdnaszf_xsckmxtjiyss`.`hpcjzj`, `ud_1kajdnaszf_xsckmxtjiyss`.`hpzyh`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`hdfkje`, `ud_1kajdnaszf_xsckmxtjiyss`.`ysje`, `ud_1kajdnaszf_xsckmxtjiyss`.`yghpcb`, `ud_1kajdnaszf_xsckmxtjiyss`.`hpcb`, `ud_1kajdnaszf_xsckmxtjiyss`.`sjhpzcb`, `ud_1kajdnaszf_xsckmxtjiyss`.`khwm`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`shr`, `ud_1kajdnaszf_xsckmxtjiyss`.`shdq`, `ud_1kajdnaszf_xsckmxtjiyss`.`shdz`, `ud_1kajdnaszf_xsckmxtjiyss`.`sjrsj`, `ud_1kajdnaszf_xsckmxtjiyss`.`sjrdh`, `ud_1kajdnaszf_xsckmxtjiyss`.`wlgs`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`xkfp`, `ud_1kajdnaszf_xsckmxtjiyss`.`bjmc`, `ud_1kajdnaszf_xsckmxtjiyss`.`zdr`, `ud_1kajdnaszf_xsckmxtjiyss`.`ddy`, `ud_1kajdnaszf_xsckmxtjiyss`.`jhy`, `ud_1kajdnaszf_xsckmxtjiyss`.`dby`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`yhy`, `ud_1kajdnaszf_xsckmxtjiyss`.`fhy`, `ud_1kajdnaszf_xsckmxtjiyss`.`ywy`, `ud_1kajdnaszf_xsckmxtjiyss`.`dypc`, `ud_1kajdnaszf_xsckmxtjiyss`.`wlddyzt`, `ud_1kajdnaszf_xsckmxtjiyss`.`fhddyzt`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`fjbcdyzt`, `ud_1kajdnaszf_xsckmxtjiyss`.`fjbcbh`, `ud_1kajdnaszf_xsckmxtjiyss`.`zfsj`, `ud_1kajdnaszf_xsckmxtjiyss`.`xdsj`, `ud_1kajdnaszf_xsckmxtjiyss`.`fhsj`, `ud_1kajdnaszf_xsckmxtjiyss`.`rfq`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`zpfs`, `ud_1kajdnaszf_xsckmxtjiyss`.`mjly`, `ud_1kajdnaszf_xsckmxtjiyss`.`kfbz`, `ud_1kajdnaszf_xsckmxtjiyss`.`dybz`, `ud_1kajdnaszf_xsckmxtjiyss`.`bz`, `ud_1kajdnaszf_xsckmxtjiyss`.`bz1`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`lyzhzbm`, `ud_1kajdnaszf_xsckmxtjiyss`.`lyzhzmc`, `ud_1kajdnaszf_xsckmxtjiyss`.`lyzhzsl`, `ud_1kajdnaszf_xsckmxtjiyss`.`ckbq`, `ud_1kajdnaszf_xsckmxtjiyss`.`ddbq`, `ud_1kajdnaszf_xsckmxtjiyss`.`dplsj`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`splm`, `ud_1kajdnaszf_xsckmxtjiyss`.`xl`, `ud_1kajdnaszf_xsckmxtjiyss`.`fz`, `ud_1kajdnaszf_xsckmxtjiyss`.`zk`, `ud_1kajdnaszf_xsckmxtjiyss`.`sl`, `ud_1kajdnaszf_xsckmxtjiyss`.`cgfl`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`pddfl`, `ud_1kajdnaszf_xsckmxtjiyss`.`hppp`, `ud_1kajdnaszf_xsckmxtjiyss`.`syxd`, `ud_1kajdnaszf_xsckmxtjiyss`.`hpsx4`, `ud_1kajdnaszf_xsckmxtjiyss`.`hpsx5`, `ud_1kajdnaszf_xsckmxtjiyss`.`cgfl1`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`yxfl`, `ud_1kajdnaszf_xsckmxtjiyss`.`zhzxl`, `ud_1kajdnaszf_xsckmxtjiyss`.`tsfl`, `ud_1kajdnaszf_xsckmxtjiyss`.`zhzpddfl`, `ud_1kajdnaszf_xsckmxtjiyss`.`zdysje`, `ud_1kajdnaszf_xsckmxtjiyss`.`yf`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`wldbh`, `ud_1kajdnaszf_xsckmxtjiyss`.`zddygzl`, `ud_1kajdnaszf_xsckmxtjiyss`.`czjg`, `ud_1kajdnaszf_xsckmxtjiyss`.`ygyzcb`, `ud_1kajdnaszf_xsckmxtjiyss`.`czygyz`, `ud_1kajdnaszf_xsckmxtjiyss`.`pthpi`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`fxysdh`, `ud_1kajdnaszf_xsckmxtjiyss`.`fxsmc`, `ud_1kajdnaszf_xsckmxtjiyss`.`fxsbh`, `ud_1kajdnaszf_xsckmxtjiyss`.`mxdygzl`, `ud_1kajdnaszf_xsckmxtjiyss`.`jsygyzcb`, `ud_1kajdnaszf_xsckmxtjiyss`.`ddly`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`sh`, `ud_1kajdnaszf_xsckmxtjiyss`.`fc`, `ud_1kajdnaszf_xsckmxtjiyss`.`spsx`, `ud_1kajdnaszf_xsckmxtjiyss`.`nj`, `ud_1kajdnaszf_xsckmxtjiyss`.`cf2`
FROM ((SELECT `zcck`
FROM ((SELECT `zcck`
FROM ((SELECT `zcck`
FROM ((SELECT `zcck`
FROM ((SELECT `ud_1kajdnaszf_zcck`.`zcck`
FROM `cubeappdata`.`ud_1kajdnaszf_zcck`)
UNION ALL
(SELECT '省代补发' AS `EXPR$0`
FROM (VALUES  (0)) AS `t` (`ZERO`))) AS `t0`
GROUP BY `zcck`)
UNION ALL
(SELECT '武汉菜鸟云仓' AS `EXPR$0`
FROM (VALUES  (0)) AS `t` (`ZERO`))) AS `t2`
GROUP BY `zcck`)
UNION ALL
(SELECT '廊坊菜鸟云仓' AS `EXPR$0`
FROM (VALUES  (0)) AS `t` (`ZERO`))) AS `t4`
GROUP BY `zcck`)
UNION ALL
(SELECT '南京物料仓' AS `EXPR$0`
FROM (VALUES  (0)) AS `t` (`ZERO`))) AS `t6`
GROUP BY `zcck`) AS `t6` RIGHT JOIN (SELECT `cjsj` AS `cjsj`, `ddbh` AS `ddbh`, `ysdh` AS `ysdh`, `yszdh` AS `yszdh`, `zdysdh` AS `zdysdh`, `ddlb` AS `ddlb`, `zfzh` AS `zfzh`, `ckdbh` AS `ckdbh`, `ck` AS `ck`, `dp` AS `dp`, `ckdzt` AS `ckdzt`,
                                            `ckzt` AS `ckzt`, `fjxh` AS `fjxh`, `sjbm` AS `sjbm`, `hpbh` AS `hpbh`, `hpmc` AS `hpmc`, `hpjc` AS `hpjc`, `pp` AS `pp`, `fl` AS `fl`, `ggm` AS `ggm`, `ggmc` AS `ggmc`, `tm` AS `tm`, `hpsl` AS `hpsl`,
                                            `hpydj` AS `hpydj`, `hpyzje` AS `hpyzje`, `ddzyh` AS `ddzyh`, `ddyf` AS `ddyf`, `ftyf` AS `ftyf`, `hpcjj` AS `hpcjj`, `hpcjzj` AS `hpcjzj`, `hpzyh` AS `hpzyh`, `hdfkje` AS `hdfkje`, `ysje` AS `ysje`,
                                            `yghpcb` AS `yghpcb`, `hpcb` AS `hpcb`, `sjhpzcb` AS `sjhpzcb`, `khwm` AS `khwm`, `shr` AS `shr`, `shdq` AS `shdq`, `shdz` AS `shdz`, `sjrsj` AS `sjrsj`, `sjrdh` AS `sjrdh`, `wlgs` AS `wlgs`,
                                            `xkfp` AS `xkfp`, `bjmc` AS `bjmc`, `zdr` AS `zdr`, `ddy` AS `ddy`, `jhy` AS `jhy`, `dby` AS `dby`, `yhy` AS `yhy`, `fhy` AS `fhy`, `ywy` AS `ywy`, `dypc` AS `dypc`, `wlddyzt` AS `wlddyzt`,
                                            `fhddyzt` AS `fhddyzt`, `fjbcdyzt` AS `fjbcdyzt`, `fjbcbh` AS `fjbcbh`, `zfsj` AS `zfsj`, `xdsj` AS `xdsj`, `fhsj` AS `fhsj`, `rfq` AS `rfq`, `zpfs` AS `zpfs`, `mjly` AS `mjly`, `kfbz` AS `kfbz`,
                                            `dybz` AS `dybz`, `bz` AS `bz`, `bz1` AS `bz1`, `lyzhzbm` AS `lyzhzbm`, `lyzhzmc` AS `lyzhzmc`, `lyzhzsl` AS `lyzhzsl`, `ckbq` AS `ckbq`, `ddbq` AS `ddbq`, `dplsj` AS `dplsj`, `splm` AS `splm`,
                                            `xl` AS `xl`, `fz` AS `fz`, `zk` AS `zk`, `sl` AS `sl`, `cgfl` AS `cgfl`, `pddfl` AS `pddfl`, `hppp` AS `hppp`, `syxd` AS `syxd`, `hpsx4` AS `hpsx4`, `hpsx5` AS `hpsx5`, `cgfl1` AS `cgfl1`,
                                            `yxfl` AS `yxfl`, `zhzxl` AS `zhzxl`, `tsfl` AS `tsfl`, `zhzpddfl` AS `zhzpddfl`, `zdysje` AS `zdysje`, `yf` AS `yf`, `wldbh` AS `wldbh`, `zddygzl` AS `zddygzl`, `czjg` AS `czjg`, `ygyzcb` AS `ygyzcb`,
                                            `czygyz` AS `czygyz`, `pthpi` AS `pthpi`, `fxysdh` AS `fxysdh`, `fxsmc` AS `fxsmc`, `fxsbh` AS `fxsbh`, `mxdygzl` AS `mxdygzl`, `jsygyzcb`, `ddly` AS `ddly`, `sh` AS `sh`, `fc` AS `fc`, `spsx` AS `spsx`,
                                            `nj` AS `nj`, `cf2` AS `cf2`
FROM (SELECT `cjsj`, `ddbh`, `ysdh`, `yszdh`, `zdysdh`, `ddlb`, `zfzh`, `ckdbh`, `ck`, `dp`, `ckdzt`, `ckzt`, `fjxh`, `sjbm`, `hpbh`, `hpmc`, `hpjc`, `pp`, `fl`, `ggm`, `ggmc`, `tm`, `hpsl`, `hpydj`, `hpyzje`, `ddzyh`, `ddyf`, `ftyf`,
             `hpcjj`, `hpcjzj`, `hpzyh`, `hdfkje`, `ysje`, `yghpcb`, `hpcb`, `sjhpzcb`, `khwm`, `shr`, `shdq`, `shdz`, `sjrsj`, `sjrdh`, `wlgs`, `xkfp`, `bjmc`, `zdr`, `ddy`, `jhy`, `dby`, `yhy`, `fhy`, `ywy`, `dypc`, `wlddyzt`, `fhddyzt`,
             `fjbcdyzt`, `fjbcbh`, `zfsj`, `xdsj`, `fhsj`, `rfq`, `zpfs`, `mjly`, `kfbz`, `dybz`, `bz`, `bz1`, `lyzhzbm`, `lyzhzmc`, `lyzhzsl`, `ckbq`, `ddbq`, `dplsj`, `splm`, `xl`, `fz`, `zk`, `sl`, `cgfl`, `pddfl`, `hppp`, `syxd`,
             `hpsx4`, `hpsx5`, `cgfl1`, `yxfl`, `zhzxl`, `tsfl`, `zhzpddfl`, `zdysje`, `yf`, `wldbh`, `zddygzl`, `czjg`, `ygyzcb`, `czygyz`, `pthpi`, `fxysdh`, `fxsmc`, `fxsbh`, `mxdygzl`,
             CAST(((`$107` / CASE WHEN `w0$o0` > 0 THEN CAST(`w0$o1` AS DECIMAL(38, 8)) ELSE CAST(NULL AS DECIMAL(38, 8)) END) * `$108`) AS DOUBLE) AS `jsygyzcb`, `ddly`, `sh`, `fc`, `spsx`, `nj`, `cf2`
FROM (SELECT `cjsj`, `ddbh`, `ysdh`, `yszdh`, `zdysdh`, `ddlb`, `zfzh`, `ckdbh`, `ck`, `dp`, `ckdzt`, `ckzt`, `fjxh`, `sjbm`, `hpbh`, `hpmc`, `hpjc`, `pp`, `fl`, `ggm`, `ggmc`, `tm`, `hpsl`, `hpydj`, `hpyzje`, `ddzyh`, `ddyf`, `ftyf`,
             `hpcjj`, `hpcjzj`, `hpzyh`, `hdfkje`, `ysje`, `yghpcb`, `hpcb`, `sjhpzcb`, `khwm`, `shr`, `shdq`, `shdz`, `sjrsj`, `sjrdh`, `wlgs`, `xkfp`, `bjmc`, `zdr`, `ddy`, `jhy`, `dby`, `yhy`, `fhy`, `ywy`, `dypc`, `wlddyzt`, `fhddyzt`,
             `fjbcdyzt`, `fjbcbh`, `zfsj`, `xdsj`, `fhsj`, `rfq`, `zpfs`, `mjly`, `kfbz`, `dybz`, `bz`, `bz1`, `lyzhzbm`, `lyzhzmc`, `lyzhzsl`, `ckbq`, `ddbq`, `dplsj`, `splm`, `xl`, `fz`, `zk`, `sl`, `cgfl`, `pddfl`, `hppp`, `syxd`, `hpsx4`,
             `hpsx5`, `cgfl1`, `yxfl`, `zhzxl`, `tsfl`, `zhzpddfl`, `zdysje`, `yf`, `wldbh`, `zddygzl`, `czjg`, `ygyzcb`, `czygyz`, `pthpi`, `fxysdh`, `fxsmc`, `fxsbh`, `mxdygzl`, `ddly`, `sh`, `fc`, `spsx`, `cf2`, `nj`, `$107`, `$108`,
             COUNT(`$107`) OVER (PARTITION BY `ddbh`) AS `w0$o0`, SUM(`$107`) OVER (PARTITION BY `ddbh`) AS `w0$o1`
FROM (SELECT `ud_1kajdnaszf_xsckmxtjiyss`.`cjsj`, `ud_1kajdnaszf_xsckmxtjiyss`.`ddbh`, `ud_1kajdnaszf_xsckmxtjiyss`.`ysdh`, `ud_1kajdnaszf_xsckmxtjiyss`.`yszdh`, `ud_1kajdnaszf_xsckmxtjiyss`.`zdysdh`, `ud_1kajdnaszf_xsckmxtjiyss`.`ddlb`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`zfzh`, `ud_1kajdnaszf_xsckmxtjiyss`.`ckdbh`, `ud_1kajdnaszf_xsckmxtjiyss`.`ck`, `ud_1kajdnaszf_xsckmxtjiyss`.`dp`, `ud_1kajdnaszf_xsckmxtjiyss`.`ckdzt`, `ud_1kajdnaszf_xsckmxtjiyss`.`ckzt`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`fjxh`, `ud_1kajdnaszf_xsckmxtjiyss`.`sjbm`, `ud_1kajdnaszf_xsckmxtjiyss`.`hpbh`, `ud_1kajdnaszf_xsckmxtjiyss`.`hpmc`, `ud_1kajdnaszf_xsckmxtjiyss`.`hpjc`, `ud_1kajdnaszf_xsckmxtjiyss`.`pp`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`fl`, `ud_1kajdnaszf_xsckmxtjiyss`.`ggm`, `ud_1kajdnaszf_xsckmxtjiyss`.`ggmc`, `ud_1kajdnaszf_xsckmxtjiyss`.`tm`, `ud_1kajdnaszf_xsckmxtjiyss`.`hpsl`, `ud_1kajdnaszf_xsckmxtjiyss`.`hpydj`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`hpyzje`, `ud_1kajdnaszf_xsckmxtjiyss`.`ddzyh`, `ud_1kajdnaszf_xsckmxtjiyss`.`ddyf`, CAST(`ud_1kajdnaszf_xsckmxtjiyss`.`ftyf` AS DOUBLE) AS `ftyf`, `ud_1kajdnaszf_xsckmxtjiyss`.`hpcjj`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`hpcjzj`, `ud_1kajdnaszf_xsckmxtjiyss`.`hpzyh`, `ud_1kajdnaszf_xsckmxtjiyss`.`hdfkje`, `ud_1kajdnaszf_xsckmxtjiyss`.`ysje`, `ud_1kajdnaszf_xsckmxtjiyss`.`yghpcb`, `ud_1kajdnaszf_xsckmxtjiyss`.`hpcb`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`sjhpzcb`, `ud_1kajdnaszf_xsckmxtjiyss`.`khwm`, `ud_1kajdnaszf_xsckmxtjiyss`.`shr`, `ud_1kajdnaszf_xsckmxtjiyss`.`shdq`, `ud_1kajdnaszf_xsckmxtjiyss`.`shdz`, `ud_1kajdnaszf_xsckmxtjiyss`.`sjrsj`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`sjrdh`, `ud_1kajdnaszf_xsckmxtjiyss`.`wlgs`, `ud_1kajdnaszf_xsckmxtjiyss`.`xkfp`, `ud_1kajdnaszf_xsckmxtjiyss`.`bjmc`, `ud_1kajdnaszf_xsckmxtjiyss`.`zdr`, `ud_1kajdnaszf_xsckmxtjiyss`.`ddy`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`jhy`, `ud_1kajdnaszf_xsckmxtjiyss`.`dby`, `ud_1kajdnaszf_xsckmxtjiyss`.`yhy`, `ud_1kajdnaszf_xsckmxtjiyss`.`fhy`, `ud_1kajdnaszf_xsckmxtjiyss`.`ywy`, `ud_1kajdnaszf_xsckmxtjiyss`.`dypc`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`wlddyzt`, `ud_1kajdnaszf_xsckmxtjiyss`.`fhddyzt`, `ud_1kajdnaszf_xsckmxtjiyss`.`fjbcdyzt`, `ud_1kajdnaszf_xsckmxtjiyss`.`fjbcbh`, `ud_1kajdnaszf_xsckmxtjiyss`.`zfsj`, `ud_1kajdnaszf_xsckmxtjiyss`.`xdsj`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`fhsj`, `ud_1kajdnaszf_xsckmxtjiyss`.`rfq`, `ud_1kajdnaszf_xsckmxtjiyss`.`zpfs`, `ud_1kajdnaszf_xsckmxtjiyss`.`mjly`, `ud_1kajdnaszf_xsckmxtjiyss`.`kfbz`, `ud_1kajdnaszf_xsckmxtjiyss`.`dybz`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`bz`, `ud_1kajdnaszf_xsckmxtjiyss`.`bz1`, `ud_1kajdnaszf_xsckmxtjiyss`.`lyzhzbm`, `ud_1kajdnaszf_xsckmxtjiyss`.`lyzhzmc`, `ud_1kajdnaszf_xsckmxtjiyss`.`lyzhzsl`, `ud_1kajdnaszf_xsckmxtjiyss`.`ckbq`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`ddbq`, `ud_1kajdnaszf_xsckmxtjiyss`.`dplsj`, `ud_1kajdnaszf_xsckmxtjiyss`.`splm`, `ud_1kajdnaszf_xsckmxtjiyss`.`xl`, `ud_1kajdnaszf_xsckmxtjiyss`.`fz`, `ud_1kajdnaszf_xsckmxtjiyss`.`zk`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`sl`, `ud_1kajdnaszf_xsckmxtjiyss`.`cgfl`, `ud_1kajdnaszf_xsckmxtjiyss`.`pddfl`, `ud_1kajdnaszf_xsckmxtjiyss`.`hppp`, `ud_1kajdnaszf_xsckmxtjiyss`.`syxd`, `ud_1kajdnaszf_xsckmxtjiyss`.`hpsx4`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`hpsx5`, `ud_1kajdnaszf_xsckmxtjiyss`.`cgfl1`, `ud_1kajdnaszf_xsckmxtjiyss`.`yxfl`, `ud_1kajdnaszf_xsckmxtjiyss`.`zhzxl`, `ud_1kajdnaszf_xsckmxtjiyss`.`tsfl`, `ud_1kajdnaszf_xsckmxtjiyss`.`zhzpddfl`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`zdysje`, `ud_1kajdnaszf_xsckmxtjiyss`.`yf`, `ud_1kajdnaszf_xsckmxtjiyss`.`wldbh`, `ud_1kajdnaszf_xsckmxtjiyss`.`zddygzl`, `ud_1kajdnaszf_xsckmxtjiyss`.`czjg`, `ud_1kajdnaszf_xsckmxtjiyss`.`ygyzcb`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`czygyz`, `ud_1kajdnaszf_xsckmxtjiyss`.`pthpi`, `ud_1kajdnaszf_xsckmxtjiyss`.`fxysdh`, `ud_1kajdnaszf_xsckmxtjiyss`.`fxsmc`, `ud_1kajdnaszf_xsckmxtjiyss`.`fxsbh`, `ud_1kajdnaszf_xsckmxtjiyss`.`mxdygzl`,
             `ud_1kajdnaszf_xsckmxtjiyss`.`ddly`, `ud_1kajdnaszf_xsckmxtjiyss`.`sh`, `ud_1kajdnaszf_xsckmxtjiyss`.`fc`, `ud_1kajdnaszf_xsckmxtjiyss`.`spsx`, IF(LOCATE('】', `ud_1kajdnaszf_xsckmxtjiyss`.`kfbz`),
                                                                                                                                                                SPLIT_PART(`ud_1kajdnaszf_xsckmxtjiyss`.`kfbz`, '】' , 2),
                                                                                                                                                                IF(2 = 1, `ud_1kajdnaszf_xsckmxtjiyss`.`kfbz`, NULL)) AS `cf2`,
          `ud_1kajdnaszf_xsckmxtjiyss`.`nj`, CAST(`ud_1kajdnaszf_xsckmxtjiyss`.`mxdygzl` AS DECIMAL(38, 8)) AS `$107`, CAST(`ud_1kajdnaszf_xsckmxtjiyss`.`ygyzcb` AS DECIMAL(38, 8)) AS `$108`
FROM `cubeappdata`.`ud_1kajdnaszf_xsckmxtjiyss`) AS `ud_1kajdnaszf_xsckmxtjiyss`) AS `ud_1kajdnaszf_xsckmxtjiyss`) AS `ud_1kajdnaszf_xsckmxtjiyss`) AS `ud_1kajdnaszf_xsckmxtjiyss` ON `t6`.`zcck` = `ud_1kajdnaszf_xsckmxtjiyss`.`ck`)
WHERE `t6`.`zcck` IS NULL) AS `t8`) AS `t10`) AS `t12`
WHERE `dp` = '系统分销店铺598ce4da') AS `t15` LIMIT 200) AS `t19`

profile也有问题


profile文件: profile.txt (191.8 KB)

卡住的时候都会有这个报错, 从spillable_partition_sort_sink_operator报出来的

【背景】做过哪些操作?
【业务影响】
集群无法响应

【是否存算分离】否
【StarRocks版本】例如:3.3.7
【集群规模】例如:1fe(1 follower)+4be
【机器信息】CPU虚拟核/内存/网卡,例如:32C/128G/万兆
【联系方式】为了在解决问题过程中能及时联系到您获取一些日志信息,请补充下您的联系方式,例如:社区群4-小李或者邮箱,谢谢
【附件】

  • fe.log/beINFO/相应截图
  • 慢查询:
    • Profile信息
    • 并行度:show variables like ‘%parallel_fragment_exec_instance_num%’;
    • pipeline是否开启:show variables like ‘%pipeline%’;
    • be节点cpu和内存使用率截图
  • 查询报错:
  • be crash
    • be.out
  • 外表查询报错
    • be.out和fe.warn.log

应该是磁盘性能到瓶颈了
spill_enable_compaction=false;
spill_enable_direct_io=false; 试一下

好的 我们试一下