为了更快的定位您的问题,请提供以下信息,谢谢
【详述】在业务高峰期会因为有较多的复杂查询导致磁盘io很高,然后数据写入失败
这是服务器的磁盘监控
【业务影响】是
【是否存算分离】否
【StarRocks版本】例如:2.5.7
【集群规模】1fe 1be 同节点
【机器信息】16c32G 500GSSD云盘
【联系方式】tengjin@mindflow.com.cn
【附件】
-
fe.log/beINFO/相应截图
-
慢查询:
insert into dwd_label_job_order_object_detail with job_transfer as ( select distinct je.job_id ,je.job_unit_order ,je.operate_time,je.job_unit_id ,je.workflow_id, je.batch_id, je.task_id, je.user_id from ods_event_job_event je-- 作业流转表 where je.operate_time >= '${startTime}' and je.operate_time < '${endTime}' and je.event_type = 3 and je.job_id is not null and je.batch_id in (${batch_id}) ) select batch_id,task_id,job_id,job_unit_id,job_unit_order,object_id,frame_id,tool_id,operate_time,workflow_id,user_id,tool_type, if(object_type = 'IMPORT' and modify_flag = 0 ,'IMPORT_UNMODIFY', object_type) object_type, null point_num from ( select jt.batch_id,jt.task_id,jt.job_id,jt.job_unit_id,jt.job_unit_order,loe.object_id,loe.frame_id,loe.tool_id,jt.operate_time,jt.workflow_id,jt.user_id, loe.tool_type,if(import_flag = 0 ,'LABEL','IMPORT') object_type, ifnull(sum(case when import_flag = 1 and event_type = 2 and import_type_change = 1 and object_type = 'LABEL' then 1 when import_flag = 1 and event_type = 2 and import_type_change = 1 and object_type = 'IMPORT' then -1 end),0) modify_flag from ods_event_label_object_event loe join [broadcast] job_transfer jt on loe.batch_id = loe.batch_id and loe.job_id = jt.job_id and (loe.job_unit_order <= jt.job_unit_order or loe.job_unit_order is null) join [broadcast] v_tool_belong_to_label_group lg on loe.batch_id = lg.batch_id and loe.tool_id = lg.tool_id where loe.attr_scope!='GLOBAL' and loe.batch_id in (${batch_id}) group by jt.batch_id,jt.task_id,jt.job_id,jt.job_unit_id,jt.job_unit_order,loe.object_id,loe.frame_id,loe.tool_id,jt.operate_time,jt.workflow_id,jt.user_id, loe.tool_type,if(import_flag = 0 ,'LABEL','IMPORT') having sum(case event_type when 0 then 1 when 1 then -1 end ) > 0 )objs union all select distinct a.batch_id,a.task_id,a.job_id,a.job_unit_id,a.job_unit_order,os.group_id,os.frame_id,null tool_id,a.operate_time,a.workflow_id,a.user_id, 'GROUP' tool_type,os.group_type, null point_num from job_transfer a join dws_tool_group_statistics os on a.job_id = os.job_id and a.job_unit_order >= os.create_order where os.batch_id in (${batch_id}) and ((os.delete_order is null or a.job_unit_order < os.delete_order) -- 未被删除 或 后面被删除的 or (a.job_unit_order >= os.delete_order and os.final_valid > 0)) union all select * from ( select any_value(b.batch_id), any_value(b.task_id), any_value(b.job_id), any_value(a.job_unit_id), max(a.job_unit_order), any_value(b.object_id), any_value(b.frame_id), any_value(b.tool_id), max(b.operate_time), any_value(b.workflow_id), max_by(a.user_id, b.job_unit_order),any_value(b.tool_type),null object_type, max_by(b.point_count,b.job_unit_order) point_count from dwd_object_point_count_statistics b join job_transfer a on b.job_id=a.job_id and a.job_unit_order >= b.job_unit_order where b.batch_id in (${batch_id}) group by b.object_id ) a where point_count > 0 ;