sim的starrocks慢查信息

65 阅读16分钟

一、集群信息

序号应用名(srv)节点IP角色配置版本备注1备注2
4cic-wdd-physical172.16.224.47fe/be64C/256G5.1.0智能货物
5172.16.224.48fe/be64C/256G5.1.0智能货物
6172.16.224.49fe/be64C/256G5.1.0智能货物

二、时间

xxxx.7.8的上午11:50 左右

CPU

磁盘IO

三、慢查信息

通过 starrocks_audit_db__.starrocks_audit_tbl__ 找到查询信息。

  1. top5


 *************************** 1. row ***************************
       queryId: 068adeae-5b54-11f0-8947-9cc2c42abc80
     timestamp: 2025-07-08 01:01:29
     queryType: slow_query
      clientIp: 172.16.224.48:34914
          user: cic_data_readonly
authorizedUser: 'cic_data_readonly'@'%'
 resourceGroup: default_wg
       catalog: default_catalog
            db: cic_data_center
         state: EOF
     errorCode:
     queryTime: 2061839
     scanBytes: 10440669273
      scanRows: 252446423
    returnRows: 137571557
     cpuCostNs: 788696857635
  memCostBytes: 6640057867
        stmtId: NULL
       isQuery: 1
          feIp: 172.16.224.49
          stmt: select * from ( SELECT store.store_code AS '餐厅编码', store.store_name as '餐厅名称', tree.market_name as '市场', tree.rgm_name, tree.am_name, tree.dm_nam
e, jde.jde_code AS '品项编码', jde.jde_name AS '品项名称', check_result.check_date as '明细盘点日', check_summary.check_date as '汇总盘点日', check_summary.total_amount - 
ifnull( check_result.no_contains_inventory_amount, 0 ) AS '盘点表录入数量', pss.check_amount AS '已提交的盘点数量', jde.check_unit_name AS '盘点单位', purchase.business_da
te as '进货区间', purchase.purchase_amount as '期间进货总量', purchase.unit_name as '进货单位', realstorage.num as '理论库存', realstorage.unit_name as '理论库存单位' FROM
 system_t_sph_store_info store CROSS JOIN ( SELECT '86233127' AS jde_code UNION ALL SELECT '86233125' UNION ALL SELECT '86233201' UNION ALL SELECT '86233199' UNION ALL SEL
ECT '86233196' ) m LEFT JOIN cic_check_result check_result ON store.store_code = check_result.store_code AND m.jde_code = check_result.item_code AND check_result.check_dat
e >= '2025-05-10' LEFT JOIN cic_check_result_summary check_summary ON check_summary.store_code = store.store_code AND check_summary.item_code = m.jde_code AND check_summar
y.check_date >= '2025-05-10' LEFT JOIN operation_flow_count pss ON store.brand_code = 2 AND store.store_code = pss.store_code AND pss.business_date >= '2025-05-10' AND m.j
de_code = pss.merchandise_code LEFT JOIN ims_basic_info_jde jde ON jde.brand_code = '2' AND jde.jde_code = m.jde_code LEFT JOIN ( SELECT store_code, merchandise_code, busi
ness_date, purchase_amount , unit_name FROM operation_flow_count WHERE brand_code = 2 AND business_date >= '2025-04-22' AND merchandise_code IN ( '86233127', '86233125', '
86233201', '86233199', '86233196' ) ) purchase on store.store_code = purchase.store_code and m.jde_code = purchase.merchandise_code left join system_t_store_tree tree on t
ree.store_code = store.store_code left join (SELECT store_code, item_code, sum( batch_amount ) as 'num', unit_name FROM cic_realstorage_info WHERE brand_code = 2 AND item_
code IN ( '86233127', '86233125', '86233201', '86233199', '86233196' ) GROUP BY store_code, item_code, unit_name) as realstorage on realstorage.store_code = store.store_co
de and realstorage.item_code = m.jde_code WHERE ( store.business_close_date > now() OR store.business_close_date IS NULL ) and store.business_open_date <= now() and store.
business_state_code = 10 AND store.brand_code = '2' ) as `table_real`
        digest: 8d6fb52653d47b413fa55532834d56e3
  planCpuCosts: 1.3800589453501938e+16
  planMemCosts: 2257606001.740869
*************************** 2. row ***************************
       queryId: 80be3c9b-5b8e-11f0-8947-9cc2c42abc80
     timestamp: 2025-07-08 08:00:05
     queryType: slow_query
      clientIp: 172.16.224.48:37290
          user: cic_data_readonly
authorizedUser: 'cic_data_readonly'@'%'
 resourceGroup: default_wg
       catalog: default_catalog
            db: cic_data_center
         state: EOF
     errorCode:
     queryTime: 1846653
     scanBytes: 8602364850
      scanRows: 261373500
    returnRows: 9742975
     cpuCostNs: 433981746981
  memCostBytes: 6831297032
        stmtId: NULL
       isQuery: 1
          feIp: 172.16.224.49
          stmt: WITH ranked_operations AS ( SELECT detail.brand_code AS brand_code, detail.store_code AS store_code, detail.business_date AS business_date, detail.merchand
ise_code AS merchandise_code, jde.jde_name, detail.unit_code AS unit_code, detail.unit_name AS unit_name, detail.operation_amount AS operation_amount, detail.operation_id 
AS operation_id, detail.operation_time AS operation_time, ROW_NUMBER() OVER ( PARTITION BY detail.store_code, detail.merchandise_code ORDER BY detail.operation_time, detai
l.operation_id -- 增加operation_id确保排序稳定
 ) AS rn, LAG(detail.operation_amount) OVER ( PARTITION BY detail.store_code, detail.merchandise_code ORDER BY detail.operation_time, detail.operation_id ) AS prev_after_a
mount, -- 新增金额变化标记:首次操作 或 金额与前次不同 则标记为True
 CASE WHEN ROW_NUMBER() OVER ( PARTITION BY detail.store_code, detail.merchandise_code ORDER BY detail.operation_time, detail.operation_id ) = 1 THEN TRUE ELSE detail.oper
ation_amount <> LAG(detail.operation_amount) OVER ( PARTITION BY detail.store_code, detail.merchandise_code ORDER BY detail.operation_time, detail.operation_id ) END AS is
_amount_changed FROM operation_flow_detail detail INNER JOIN ims_basic_info_jde jde ON jde.brand_code = detail.brand_code AND jde.jde_code = detail.merchandise_code LEFT J
OIN operation_flow_count count ON detail.store_code = count.store_code AND detail.merchandise_code = count.merchandise_code AND detail.business_date = count.business_date 
WHERE detail.operation_type = '12' AND detail.operation_id != '系统重算' AND detail.business_date BETWEEN '2025-06-30' AND '2025-07-06' AND COALESCE(count.is_theory, '') !
= 'Y' ), enriched_data AS ( SELECT brand_code, store_code, business_date, merchandise_code, jde_name, unit_code, unit_name, operation_amount, operation_id, operation_time,
 is_amount_changed, -- 保留金额变化标记
 CASE WHEN rn = 1 THEN '新增' ELSE '修改' END AS operation_type, CASE WHEN rn = 1 THEN 0 ELSE prev_after_amount END AS before_amount FROM ranked_operations ), group_stats 
AS ( SELECT store_code, business_date, merchandise_code, -- 核心修改:仅统计金额变化的操作次数
 SUM(CASE WHEN is_amount_changed THEN 1 ELSE 0 END) AS operation_times, MIN(operation_time) AS min_operation_time, MAX(operation_time) AS max_operation_time FROM enriched_
data GROUP BY store_code, business_date, merchandise_code ), min_max_values AS ( SELECT ed.store_code, ed.business_date, ed.merchandise_code, ed.operation_time, ed.operati
on_amount, stats.operation_times, stats.min_operation_time, stats.max_operation_time, CASE WHEN ed.operation_time = stats.min_operation_time THEN ed.operation_amount END A
S min_operation_amount, CASE WHEN ed.operation_time = stats.max_operation_time THEN ed.operation_amount END AS max_operation_amount FROM enriched_data ed JOIN group_stats 
stats ON ed.store_code = stats.store_code AND ed.business_date = stats.business_date AND ed.merchandise_code = stats.merchandise_code ) SELECT store_code, business_date, m
erchandise_code, operation_times - 1 as operation_times, MAX(min_operation_time) AS min_operationTime, MAX(min_operation_amount) AS min_operationAmount, MAX(max_operation_
time) AS max_operationTime, MAX(max_operation_amount) AS max_operationAmount FROM min_max_values GROUP BY store_code, business_date, merchandise_code, operation_times;    
        digest: 2d9e3052b0b79852d21412de668dbcca
  planCpuCosts: 43176501037.77669
  planMemCosts: 4936724699.961493
*************************** 3. row ***************************
       queryId: 667e55f1-5b8c-11f0-8ae4-3868dda12628
     timestamp: 2025-07-08 07:45:02
     queryType: slow_query
      clientIp: 172.16.224.48:50397
          user: cic_data_readonly
authorizedUser: 'cic_data_readonly'@'%'
 resourceGroup: default_wg
       catalog: default_catalog
            db: cic_data_center
         state: EOF
     errorCode:
     queryTime: 1171686
     scanBytes: 2740407344
      scanRows: 33872084
    returnRows: 6237086
     cpuCostNs: 46365564115
  memCostBytes: 970687269
        stmtId: NULL
       isQuery: 1
          feIp: 172.16.224.48
          stmt: WITH ranked_operations AS ( SELECT store_code, input_date, item_code, duty_part, duty_part_name, item_name, operate_type, source, old_amount, new_amount, o
perate_time, operator_id, operate_msg, ROW_NUMBER() OVER ( PARTITION BY store_code, input_date ORDER BY operate_time ) AS rn FROM cic_loss_operate_log WHERE input_date >= 
'2025-06-30' AND input_date <= '2025-07-06' ) SELECT store_code, input_date, item_code, item_name, duty_part, duty_part_name, operate_type, source, old_amount, new_amount,
 operate_time, operator_id, operate_msg FROM ranked_operations ORDER BY store_code, input_date, operate_time;
        digest: 8c84b931e83d7ea7642fa6af9a4c5428
  planCpuCosts: 134906621.90163934
  planMemCosts: 89937747.93442623
3 rows in set (1.39 sec)
                                                                                                                                                                           
mysql> select *  from starrocks_audit_tbl__  where `timestamp` between '2025-07-08 00:00:00' and '2025-07-08 23:59:59' order by queryTime desc limit 5\G                   
*************************** 1. row ***************************
       queryId: 068adeae-5b54-11f0-8947-9cc2c42abc80
     timestamp: 2025-07-08 01:01:29
     queryType: slow_query
      clientIp: 172.16.224.48:34914
          user: cic_data_readonly
authorizedUser: 'cic_data_readonly'@'%'
 resourceGroup: default_wg
       catalog: default_catalog
            db: cic_data_center
         state: EOF
     errorCode:
     queryTime: 2061839
     scanBytes: 10440669273
      scanRows: 252446423
    returnRows: 137571557
     cpuCostNs: 788696857635
  memCostBytes: 6640057867
        stmtId: NULL
       isQuery: 1
          feIp: 172.16.224.49
          stmt: select * from ( SELECT store.store_code AS '餐厅编码', store.store_name as '餐厅名称', tree.market_name as '市场', tree.rgm_name, tree.am_name, tree.dm_nam
e, jde.jde_code AS '品项编码', jde.jde_name AS '品项名称', check_result.check_date as '明细盘点日', check_summary.check_date as '汇总盘点日', check_summary.total_amount - 
ifnull( check_result.no_contains_inventory_amount, 0 ) AS '盘点表录入数量', pss.check_amount AS '已提交的盘点数量', jde.check_unit_name AS '盘点单位', purchase.business_da
te as '进货区间', purchase.purchase_amount as '期间进货总量', purchase.unit_name as '进货单位', realstorage.num as '理论库存', realstorage.unit_name as '理论库存单位' FROM
 system_t_sph_store_info store CROSS JOIN ( SELECT '86233127' AS jde_code UNION ALL SELECT '86233125' UNION ALL SELECT '86233201' UNION ALL SELECT '86233199' UNION ALL SEL
ECT '86233196' ) m LEFT JOIN cic_check_result check_result ON store.store_code = check_result.store_code AND m.jde_code = check_result.item_code AND check_result.check_dat
e >= '2025-05-10' LEFT JOIN cic_check_result_summary check_summary ON check_summary.store_code = store.store_code AND check_summary.item_code = m.jde_code AND check_summar
y.check_date >= '2025-05-10' LEFT JOIN operation_flow_count pss ON store.brand_code = 2 AND store.store_code = pss.store_code AND pss.business_date >= '2025-05-10' AND m.j
de_code = pss.merchandise_code LEFT JOIN ims_basic_info_jde jde ON jde.brand_code = '2' AND jde.jde_code = m.jde_code LEFT JOIN ( SELECT store_code, merchandise_code, busi
ness_date, purchase_amount , unit_name FROM operation_flow_count WHERE brand_code = 2 AND business_date >= '2025-04-22' AND merchandise_code IN ( '86233127', '86233125', '
86233201', '86233199', '86233196' ) ) purchase on store.store_code = purchase.store_code and m.jde_code = purchase.merchandise_code left join system_t_store_tree tree on t
ree.store_code = store.store_code left join (SELECT store_code, item_code, sum( batch_amount ) as 'num', unit_name FROM cic_realstorage_info WHERE brand_code = 2 AND item_
code IN ( '86233127', '86233125', '86233201', '86233199', '86233196' ) GROUP BY store_code, item_code, unit_name) as realstorage on realstorage.store_code = store.store_co
de and realstorage.item_code = m.jde_code WHERE ( store.business_close_date > now() OR store.business_close_date IS NULL ) and store.business_open_date <= now() and store.
business_state_code = 10 AND store.brand_code = '2' ) as `table_real`
        digest: 8d6fb52653d47b413fa55532834d56e3
  planCpuCosts: 1.3800589453501938e+16
  planMemCosts: 2257606001.740869
*************************** 2. row ***************************
       queryId: 80be3c9b-5b8e-11f0-8947-9cc2c42abc80
     timestamp: 2025-07-08 08:00:05
     queryType: slow_query
      clientIp: 172.16.224.48:37290
          user: cic_data_readonly
authorizedUser: 'cic_data_readonly'@'%'
 resourceGroup: default_wg
       catalog: default_catalog
            db: cic_data_center
         state: EOF
     errorCode:
     queryTime: 1846653
     scanBytes: 8602364850                                                                                                                                                 
      scanRows: 261373500                                                                                                                                                  
    returnRows: 9742975                                                                                                                                                    
     cpuCostNs: 433981746981                                                                                                                                               
  memCostBytes: 6831297032                                                                                                                                                 
        stmtId: NULL                                                                                                                                                       
       isQuery: 1                                                                                                                                                          
          feIp: 172.16.224.49                                                                                                                                              
          stmt: WITH ranked_operations AS ( SELECT detail.brand_code AS brand_code, detail.store_code AS store_code, detail.business_date AS business_date, detail.merchand
ise_code AS merchandise_code, jde.jde_name, detail.unit_code AS unit_code, detail.unit_name AS unit_name, detail.operation_amount AS operation_amount, detail.operation_id 
AS operation_id, detail.operation_time AS operation_time, ROW_NUMBER() OVER ( PARTITION BY detail.store_code, detail.merchandise_code ORDER BY detail.operation_time, detai
l.operation_id -- 增加operation_id确保排序稳定                                                                                                                             
 ) AS rn, LAG(detail.operation_amount) OVER ( PARTITION BY detail.store_code, detail.merchandise_code ORDER BY detail.operation_time, detail.operation_id ) AS prev_after_a
mount, -- 新增金额变化标记:首次操作 或 金额与前次不同 则标记为True                                                                                                        
 CASE WHEN ROW_NUMBER() OVER ( PARTITION BY detail.store_code, detail.merchandise_code ORDER BY detail.operation_time, detail.operation_id ) = 1 THEN TRUE ELSE detail.oper
ation_amount <> LAG(detail.operation_amount) OVER ( PARTITION BY detail.store_code, detail.merchandise_code ORDER BY detail.operation_time, detail.operation_id ) END AS is
_amount_changed FROM operation_flow_detail detail INNER JOIN ims_basic_info_jde jde ON jde.brand_code = detail.brand_code AND jde.jde_code = detail.merchandise_code LEFT J
OIN operation_flow_count count ON detail.store_code = count.store_code AND detail.merchandise_code = count.merchandise_code AND detail.business_date = count.business_date 
WHERE detail.operation_type = '12' AND detail.operation_id != '系统重算' AND detail.business_date BETWEEN '2025-06-30' AND '2025-07-06' AND COALESCE(count.is_theory, '') !
= 'Y' ), enriched_data AS ( SELECT brand_code, store_code, business_date, merchandise_code, jde_name, unit_code, unit_name, operation_amount, operation_id, operation_time,
 is_amount_changed, -- 保留金额变化标记                                                                                                                                    
 CASE WHEN rn = 1 THEN '新增' ELSE '修改' END AS operation_type, CASE WHEN rn = 1 THEN 0 ELSE prev_after_amount END AS before_amount FROM ranked_operations ), group_stats 
AS ( SELECT store_code, business_date, merchandise_code, -- 核心修改:仅统计金额变化的操作次数                                                                             
 SUM(CASE WHEN is_amount_changed THEN 1 ELSE 0 END) AS operation_times, MIN(operation_time) AS min_operation_time, MAX(operation_time) AS max_operation_time FROM enriched_
data GROUP BY store_code, business_date, merchandise_code ), min_max_values AS ( SELECT ed.store_code, ed.business_date, ed.merchandise_code, ed.operation_time, ed.operati
on_amount, stats.operation_times, stats.min_operation_time, stats.max_operation_time, CASE WHEN ed.operation_time = stats.min_operation_time THEN ed.operation_amount END A
S min_operation_amount, CASE WHEN ed.operation_time = stats.max_operation_time THEN ed.operation_amount END AS max_operation_amount FROM enriched_data ed JOIN group_stats 
stats ON ed.store_code = stats.store_code AND ed.business_date = stats.business_date AND ed.merchandise_code = stats.merchandise_code ) SELECT store_code, business_date, m
erchandise_code, operation_times - 1 as operation_times, MAX(min_operation_time) AS min_operationTime, MAX(min_operation_amount) AS min_operationAmount, MAX(max_operation_
time) AS max_operationTime, MAX(max_operation_amount) AS max_operationAmount FROM min_max_values GROUP BY store_code, business_date, merchandise_code, operation_times;    
        digest: 2d9e3052b0b79852d21412de668dbcca                                                                                                                           
  planCpuCosts: 43176501037.77669                                                                                                                                          
  planMemCosts: 4936724699.961493                                                                                                                                          
*************************** 3. row ***************************                                                                                                             
       queryId: 667e55f1-5b8c-11f0-8ae4-3868dda12628                                                                                                                       
     timestamp: 2025-07-08 07:45:02                                                                                                                                        
     queryType: slow_query                                                                                                                                                 
      clientIp: 172.16.224.48:50397                                                                                                                                        
          user: cic_data_readonly                                                                                                                                          
authorizedUser: 'cic_data_readonly'@'%'                                                                                                                                    
 resourceGroup: default_wg                                                                                                                                                 
       catalog: default_catalog                                                                                                                                            
            db: cic_data_center                                                                                                                                            
         state: EOF                                                                                                                                                        
     errorCode:                                                                                                                                                            
     queryTime: 1171686                                                                                                                                                    
     scanBytes: 2740407344                                                                                                                                                 
      scanRows: 33872084                                                                                                                                                   
    returnRows: 6237086                                                                                                                                                    
     cpuCostNs: 46365564115                                                                                                                                                
  memCostBytes: 970687269                                                                                                                                                  
        stmtId: NULL                                                                                                                                                       
       isQuery: 1                                                                                                                                                          
          feIp: 172.16.224.48                                                                                                                                              
          stmt: WITH ranked_operations AS ( SELECT store_code, input_date, item_code, duty_part, duty_part_name, item_name, operate_type, source, old_amount, new_amount, o
perate_time, operator_id, operate_msg, ROW_NUMBER() OVER ( PARTITION BY store_code, input_date ORDER BY operate_time ) AS rn FROM cic_loss_operate_log WHERE input_date >= 
'2025-06-30' AND input_date <= '2025-07-06' ) SELECT store_code, input_date, item_code, item_name, duty_part, duty_part_name, operate_type, source, old_amount, new_amount,
 operate_time, operator_id, operate_msg FROM ranked_operations ORDER BY store_code, input_date, operate_time;                                                              
        digest: 8c84b931e83d7ea7642fa6af9a4c5428                                                                                                                           
  planCpuCosts: 134906621.90163934                                                                                                                                         
  planMemCosts: 89937747.93442623                                                                                                                                          
*************************** 4. row ***************************                                                                                                             
       queryId: 0ae3181a-5bad-11f0-8947-9cc2c42abc80                                                                                                                       
     timestamp: 2025-07-08 11:38:41                                                                                                                                        
     queryType: slow_query                                                                                                                                                 
      clientIp: 172.16.224.48:59936                                                                                                                                        
          user: cic_data_control                                                                                                                                           
authorizedUser: 'cic_data_control'@'%'                                                                                                                                     
 resourceGroup: default_wg                                                                                                                                                 
       catalog: default_catalog                                                                                                                                            
            db: cic_data_center                                                                                                                                            
         state: EOF                                                                                                                                                        
     errorCode:                                                                                                                                                            
     queryTime: 584532                                                                                                                                                     
     scanBytes: 33714473158                                                                                                                                                
      scanRows: 79951662                                                                                                                                                   
    returnRows: 1646028                                                                                                                                                    
     cpuCostNs: 34414614205                                                                                                                                                
  memCostBytes: 672733679                                                                                                                                                  
        stmtId: NULL                                                                                                                                                       
       isQuery: 1                                                                                                                                                          
          feIp: 172.16.224.49                                                                                                                                              
          stmt: SELECT brand_code,store_code,product_code,basic_material_code,merchandise_code,recipe_code,product_name,basic_material_name AS basicMterialName,merchandise
_name,standard_yield,actual_yield,actual_yield_ratio,standard_yield_upper,standard_yield_lower,product_material_ratio,material_merchandise_ratio,product_merchandise_ratio,
material_unit_code,material_unit_name,merchandise_unit_code,merchandise_unit_name,create_id,create_time,update_id,update_time,del_flag,sell_out_flag,sell_date_list,busines
s_date FROM ims_ordering_material_mapping WHERE (del_flag = 'N' AND store_code = 'XM1864' AND product_code IN ('100007','250031','250005','200106','200108','250038','20001
8','600025','600314','300075','250091') OR basic_material_code IN ('16','20','1865','1864','1862','19','1','154','945','946','1997','6') AND business_date = '2025-07-08') 
        digest: b7b60b583c61d0da9397cac918611c5c                                                                                                                           
  planCpuCosts: 15744371.469548399                                                                                                                                         
  planMemCosts: 0                                                                                                                                                          
*************************** 5. row ***************************                                                                                                             
       queryId: 0ae2a288-5bad-11f0-8ae4-3868dda12628                                                                                                                       
     timestamp: 2025-07-08 11:38:41                                                                                                                                        
     queryType: slow_query                                                                                                                                                 
      clientIp: 172.16.224.48:36154                                                                                                                                        
          user: cic_data_control                                                                                                                                           
authorizedUser: 'cic_data_control'@'%'                                                                                                                                     
 resourceGroup: default_wg                                                                                                                                                 
       catalog: default_catalog                                                                                                                                            
            db: cic_data_center                                                                                                                                            
         state: EOF                                                                                                                                                        
     errorCode:                                                                                                                                                            
     queryTime: 583997                                                                                                                                                     
     scanBytes: 28965345676                                                                                                                                                
      scanRows: 68704046                                                                                                                                                   
    returnRows: 1647874                                                                                                                                                    
     cpuCostNs: 30150029669                                                                                                                                                
  memCostBytes: 792825253                                                                                                                                                  
        stmtId: NULL                                                                                                                                                       
       isQuery: 1                                                                                                                                                          
          feIp: 172.16.224.48                                                                                                                                              
          stmt: SELECT brand_code,store_code,product_code,basic_material_code,merchandise_code,recipe_code,product_name,basic_material_name AS basicMterialName,merchandise
_name,standard_yield,actual_yield,actual_yield_ratio,standard_yield_upper,standard_yield_lower,product_material_ratio,material_merchandise_ratio,product_merchandise_ratio,
material_unit_code,material_unit_name,merchandise_unit_code,merchandise_unit_name,create_id,create_time,update_id,update_time,del_flag,sell_out_flag,sell_date_list,busines
s_date FROM ims_ordering_material_mapping WHERE (del_flag = 'N' AND store_code = 'GZ4032' AND product_code IN ('100007','250031','250005','200106','200108','250038','20001
8','600025','600314','300075','250091') OR basic_material_code IN ('16','20','1865','1864','1862','19','1','154','945','946','1997','6') AND business_date = '2025-07-08') 
        digest: b7b60b583c61d0da9397cac918611c5c                                                                                                                           
  planCpuCosts: 15744371.469548399                                                                                                                                         
  planMemCosts: 0                                                                                                                                                          
5 rows in set (1.52 sec) 

四、11:20-12:00期间慢查(TOP20)

# 
select *  from starrocks_audit_tbl__  where `timestamp` between '2025-07-08 11:20:00' and '2025-07-08 11:59:59' order by queryTime desc limit 20;


| queryId                              | timestamp           | queryType  | clientIp            | user             | authorizedUser         | resourceGroup | catalog         | db              | state | errorCode | queryTime | scanBytes   | scanRows  | returnRows | cpuCostNs   | memCostBytes | stmtId | isQuery | feIp          | stmt                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | digest                           | planCpuCosts       | planMemCosts       |
+--------------------------------------+---------------------+------------+---------------------+------------------+------------------------+---------------+-----------------+-----------------+-------+-----------+-----------+-------------+-----------+------------+-------------+--------------+--------+---------+---------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+--------------------+--------------------+
| 0ae3181a-5bad-11f0-8947-9cc2c42abc80 | 2025-07-08 11:38:41 | slow_query | 172.16.224.48:59936 | cic_data_control | 'cic_data_control'@'%' | default_wg    | default_catalog | cic_data_center | EOF   |           |    584532 | 33714473158 |  79951662 |    1646028 | 34414614205 |    672733679 |   NULL |       1 | 172.16.224.49 | SELECT brand_code,store_code,product_code,basic_material_code,merchandise_code,recipe_code,product_name,basic_material_name AS basicMterialName,merchandise_name,standard_yield,actual_yield,actual_yield_ratio,standard_yield_upper,standard_yield_lower,product_material_ratio,material_merchandise_ratio,product_merchandise_ratio,material_unit_code,material_unit_name,merchandise_unit_code,merchandise_unit_name,create_id,create_time,update_id,update_time,del_flag,sell_out_flag,sell_date_list,business_date FROM ims_ordering_material_mapping WHERE (del_flag = 'N' AND store_code = 'XM1864' AND product_code IN ('100007','250031','250005','200106','200108','250038','200018','600025','600314','300075','250091') OR basic_material_code IN ('16','20','1865','1864','1862','19','1','154','945','946','1997','6') AND business_date = '2025-07-08')                                                                                                                                                                                           | b7b60b583c61d0da9397cac918611c5c | 15744371.469548399 |                  0 |
| 0ae2a288-5bad-11f0-8ae4-3868dda12628 | 2025-07-08 11:38:41 | slow_query | 172.16.224.48:36154 | cic_data_control | 'cic_data_control'@'%' | default_wg    | default_catalog | cic_data_center | EOF   |           |    583997 | 28965345676 |  68704046 |    1647874 | 30150029669 |    792825253 |   NULL |       1 | 172.16.224.48 | SELECT brand_code,store_code,product_code,basic_material_code,merchandise_code,recipe_code,product_name,basic_material_name AS basicMterialName,merchandise_name,standard_yield,actual_yield,actual_yield_ratio,standard_yield_upper,standard_yield_lower,product_material_ratio,material_merchandise_ratio,product_merchandise_ratio,material_unit_code,material_unit_name,merchandise_unit_code,merchandise_unit_name,create_id,create_time,update_id,update_time,del_flag,sell_out_flag,sell_date_list,business_date FROM ims_ordering_material_mapping WHERE (del_flag = 'N' AND store_code = 'GZ4032' AND product_code IN ('100007','250031','250005','200106','200108','250038','200018','600025','600314','300075','250091') OR basic_material_code IN ('16','20','1865','1864','1862','19','1','154','945','946','1997','6') AND business_date = '2025-07-08')                                                                                                                                                                                           | b7b60b583c61d0da9397cac918611c5c | 15744371.469548399 |                  0 |
| 1ac233ee-5bad-11f0-9c5e-3868dda12610 | 2025-07-08 11:39:08 | slow_query | 172.16.224.48:35844 | cic_data_control | 'cic_data_control'@'%' | default_wg    | default_catalog | cic_data_center | EOF   |           |    558216 | 51960231253 | 123246382 |    1647866 | 41382436492 |    776918578 |   NULL |       1 | 172.16.224.47 | SELECT brand_code,store_code,product_code,basic_material_code,merchandise_code,recipe_code,product_name,basic_material_name AS basicMterialName,merchandise_name,standard_yield,actual_yield,actual_yield_ratio,standard_yield_upper,standard_yield_lower,product_material_ratio,material_merchandise_ratio,product_merchandise_ratio,material_unit_code,material_unit_name,merchandise_unit_code,merchandise_unit_name,create_id,create_time,update_id,update_time,del_flag,sell_out_flag,sell_date_list,business_date FROM ims_ordering_material_mapping WHERE (del_flag = 'N' AND store_code = 'TJ2135' AND product_code IN ('100007','250031','250005','200106','200108','250038','200018','600025','600314','300075','250091') OR basic_material_code IN ('16','20','1865','1864','1862','19','1','154','945','946','1997','6') AND business_date = '2025-07-08')                                                                                                                                                                                           | b7b60b583c61d0da9397cac918611c5c | 15744371.469548399 |                  0 |
| 1ac98750-5bad-11f0-8947-9cc2c42abc80 | 2025-07-08 11:39:08 | slow_query | 172.16.224.48:36831 | cic_data_control | 'cic_data_control'@'%' | default_wg    | default_catalog | cic_data_center | EOF   |           |    557330 | 19482162720 |  46208814 |    1645136 | 31514700795 |    683041717 |   NULL |       1 | 172.16.224.49 | SELECT brand_code,store_code,product_code,basic_material_code,merchandise_code,recipe_code,product_name,basic_material_name AS basicMterialName,merchandise_name,standard_yield,actual_yield,actual_yield_ratio,standard_yield_upper,standard_yield_lower,product_material_ratio,material_merchandise_ratio,product_merchandise_ratio,material_unit_code,material_unit_name,merchandise_unit_code,merchandise_unit_name,create_id,create_time,update_id,update_time,del_flag,sell_out_flag,sell_date_list,business_date FROM ims_ordering_material_mapping WHERE (del_flag = 'N' AND store_code = 'MAF003' AND product_code IN ('100007','250031','250005','200106','200108','250038','200018','600025','600314','300075','250091') OR basic_material_code IN ('16','20','1865','1864','1862','19','1','154','945','946','1997','6') AND business_date = '2025-07-08')                                                                                                                                                                                           | b7b60b583c61d0da9397cac918611c5c | 15744371.469548399 |                  0 |
| 1be72b98-5bad-11f0-8947-9cc2c42abc80 | 2025-07-08 11:39:10 | slow_query | 172.16.224.48:38856 | cic_data_control | 'cic_data_control'@'%' | default_wg    | default_catalog | cic_data_center | EOF   |           |    555540 | 58693083077 | 139228974 |    1647868 | 40915336769 |    831182536 |   NULL |       1 | 172.16.224.49 | SELECT brand_code,store_code,product_code,basic_material_code,merchandise_code,recipe_code,product_name,basic_material_name AS basicMterialName,merchandise_name,standard_yield,actual_yield,actual_yield_ratio,standard_yield_upper,standard_yield_lower,product_material_ratio,material_merchandise_ratio,product_merchandise_ratio,material_unit_code,material_unit_name,merchandise_unit_code,merchandise_unit_name,create_id,create_time,update_id,update_time,del_flag,sell_out_flag,sell_date_list,business_date FROM ims_ordering_material_mapping WHERE (del_flag = 'N' AND store_code = 'XJG123' AND product_code IN ('100007','250031','250005','200106','200108','250038','200018','600025','600314','300075','250091') OR basic_material_code IN ('16','20','1865','1864','1862','19','1','154','945','946','1997','6') AND business_date = '2025-07-08')                                                                                                                                                                                           | b7b60b583c61d0da9397cac918611c5c | 15744371.469548399 |                  0 |
| 1bebc01a-5bad-11f0-9c5e-3868dda12610 | 2025-07-08 11:39:10 | slow_query | 172.16.224.48:42140 | cic_data_control | 'cic_data_control'@'%' | default_wg    | default_catalog | cic_data_center | EOF   |           |    555234 | 34418385271 |  81626926 |    1647780 | 38182377873 |    700387129 |   NULL |       1 | 172.16.224.47 | SELECT brand_code,store_code,product_code,basic_material_code,merchandise_code,recipe_code,product_name,basic_material_name AS basicMterialName,merchandise_name,standard_yield,actual_yield,actual_yield_ratio,standard_yield_upper,standard_yield_lower,product_material_ratio,material_merchandise_ratio,product_merchandise_ratio,material_unit_code,material_unit_name,merchandise_unit_code,merchandise_unit_name,create_id,create_time,update_id,update_time,del_flag,sell_out_flag,sell_date_list,business_date FROM ims_ordering_material_mapping WHERE (del_flag = 'N' AND store_code = 'KAE005' AND product_code IN ('100007','250031','250005','200106','200108','250038','200018','600025','600314','300075','250091') OR basic_material_code IN ('16','20','1865','1864','1862','19','1','154','945','946','1997','6') AND business_date = '2025-07-08')                                                                                                                                                                                           | b7b60b583c61d0da9397cac918611c5c | 15744371.469548399 |                  0 |
| 1f3a0017-5bad-11f0-9c5e-3868dda12610 | 2025-07-08 11:39:15 | slow_query | 172.16.224.48:46842 | cic_data_control | 'cic_data_control'@'%' | default_wg    | default_catalog | cic_data_center | EOF   |           |    550449 | 24437486160 |  57960238 |    1647857 | 34224190517 |    968846225 |   NULL |       1 | 172.16.224.47 | SELECT brand_code,store_code,product_code,basic_material_code,merchandise_code,recipe_code,product_name,basic_material_name AS basicMterialName,merchandise_name,standard_yield,actual_yield,actual_yield_ratio,standard_yield_upper,standard_yield_lower,product_material_ratio,material_merchandise_ratio,product_merchandise_ratio,material_unit_code,material_unit_name,merchandise_unit_code,merchandise_unit_name,create_id,create_time,update_id,update_time,del_flag,sell_out_flag,sell_date_list,business_date FROM ims_ordering_material_mapping WHERE (del_flag = 'N' AND store_code = 'CHS866' AND product_code IN ('100007','250031','250005','200106','200108','250038','200018','600025','600314','300075','250091') OR basic_material_code IN ('16','20','1865','1864','1862','19','1','154','945','946','1997','6') AND business_date = '2025-07-08')                                                                                                                                                                                           | b7b60b583c61d0da9397cac918611c5c | 15744371.469548399 |                  0 |
| 0f2de106-5bad-11f0-9c5e-3868dda12610 | 2025-07-08 11:38:49 | slow_query | 10.101.4.250:37082  | cic_data_control | 'cic_data_control'@'%' | default_wg    | default_catalog | cic_data_center | EOF   |           |    549572 |  1482173639 |  51383560 |          5 |  8828198218 |    197520662 |   NULL |       1 | 172.16.224.47 | SELECT o.`id`, o.`allot_order_no`, DATE_FORMAT(o.`allot_out_time`,'%Y-%m-%d %H:%i:%S') allot_out_time, DATE_FORMAT(o.`allot_in_time`,'%Y-%m-%d %H:%i:%S') allot_in_time, o.`allot_in_store_code`, o.`allot_in_store_name`, o.`allot_out_store_code`, o.`allot_out_store_name`, o.`allot_type`, o.`allot_status`, o.`allot_reason_code`, o.`allot_reason_name`, o.`create_id`, DATE_FORMAT(o.`create_time`,'%Y-%m-%d %H:%i:%S') create_time, o.`confirm_id`, DATE_FORMAT(o.`confirm_time`,'%Y-%m-%d %H:%i:%S') confirm_time, o.`update_id`, DATE_FORMAT(o.`update_time`,'%Y-%m-%d %H:%i:%S') update_time, o.`modify_reason`, sum(if(d.room_code = 1 || d.room_code = 2 || d.room_code = 4,1,0)) roomCount, o.`del_flag` FROM `cic_allot_order` o JOIN `cic_allot_order_detail`d on o.allot_order_no = d.allot_order_no WHERE o.allot_out_store_code = 'HZH229' and o.allot_out_time <= FROM_UNIXTIME('1743350400','%Y-%m-%d %H:%i:%S') group by o.`id`, o.`allot_order_no`, o.allot_out_time, o.`allot_in_time`, o.`allot_in_store_code`, o.`allot_in_store_name`, o.`allot_out_store_code`, o.`allot_out_store_name`, o.`allot_type`, o.`allot_status`, o.`allot_reason_code`, o.`allot_reason_name`, o.`create_id`, o.create_time, o.`confirm_id`, o.confirm_time, o.`update_id`, o.update_time, o.`del_flag`, `o`.`modify_reason` order by o.create_time desc limit 0,5 | d7a24a254911216dcd878c2869741f5c | 2108897519.6791036 |   834142.669185736 |
| 0f27c6a4-5bad-11f0-8ae4-3868dda12628 | 2025-07-08 11:38:49 | slow_query | 10.101.4.206:56148  | cic_data_control | 'cic_data_control'@'%' | default_wg    | default_catalog | cic_data_center | EOF   |           |    549396 |  1482173733 |  51383563 |          5 |  8692724600 |    248062750 |   NULL |       1 | 172.16.224.48 | SELECT o.`id`, o.`allot_order_no`, DATE_FORMAT(o.`allot_out_time`,'%Y-%m-%d %H:%i:%S') allot_out_time, DATE_FORMAT(o.`allot_in_time`,'%Y-%m-%d %H:%i:%S') allot_in_time, o.`allot_in_store_code`, o.`allot_in_store_name`, o.`allot_out_store_code`, o.`allot_out_store_name`, o.`allot_type`, o.`allot_status`, o.`allot_reason_code`, o.`allot_reason_name`, o.`create_id`, DATE_FORMAT(o.`create_time`,'%Y-%m-%d %H:%i:%S') create_time, o.`confirm_id`, DATE_FORMAT(o.`confirm_time`,'%Y-%m-%d %H:%i:%S') confirm_time, o.`update_id`, DATE_FORMAT(o.`update_time`,'%Y-%m-%d %H:%i:%S') update_time, o.`modify_reason`, sum(if(d.room_code = 1 || d.room_code = 2 || d.room_code = 4,1,0)) roomCount, o.`del_flag` FROM `cic_allot_order` o JOIN `cic_allot_order_detail`d on o.allot_order_no = d.allot_order_no WHERE o.allot_out_store_code = 'HZH229' and o.allot_out_time <= FROM_UNIXTIME('1743350400','%Y-%m-%d %H:%i:%S') group by o.`id`, o.`allot_order_no`, o.allot_out_time, o.`allot_in_time`, o.`allot_in_store_code`, o.`allot_in_store_name`, o.`allot_out_store_code`, o.`allot_out_store_name`, o.`allot_type`, o.`allot_status`, o.`allot_reason_code`, o.`allot_reason_name`, o.`create_id`, o.create_time, o.`confirm_id`, o.confirm_time, o.`update_id`, o.update_time, o.`del_flag`, `o`.`modify_reason` order by o.create_time desc limit 0,5 | d7a24a254911216dcd878c2869741f5c | 2108897519.6791036 |   834142.669185736 |
| 20178eec-5bad-11f0-9c5e-3868dda12610 | 2025-07-08 11:39:17 | slow_query | 172.16.224.48:46844 | cic_data_control | 'cic_data_control'@'%' | default_wg    | default_catalog | cic_data_center | EOF   |           |    548493 | 51186838388 | 121415470 |    1647748 | 41128340652 |    682391513 |   NULL |       1 | 172.16.224.47 | SELECT brand_code,store_code,product_code,basic_material_code,merchandise_code,recipe_code,product_name,basic_material_name AS basicMterialName,merchandise_name,standard_yield,actual_yield,actual_yield_ratio,standard_yield_upper,standard_yield_lower,product_material_ratio,material_merchandise_ratio,product_merchandise_ratio,material_unit_code,material_unit_name,merchandise_unit_code,merchandise_unit_name,create_id,create_time,update_id,update_time,del_flag,sell_out_flag,sell_date_list,business_date FROM ims_ordering_material_mapping WHERE (del_flag = 'N' AND store_code = 'TJ1169' AND product_code IN ('100007','250031','250005','200106','200108','250038','200018','600025','600314','300075','250091') OR basic_material_code IN ('16','20','1865','1864','1862','19','1','154','945','946','1997','6') AND business_date = '2025-07-08')                                                                                                                                                                                           | b7b60b583c61d0da9397cac918611c5c | 15744371.469548399 |                  0 |
| 11a0401b-5bad-11f0-8ae4-3868dda12628 | 2025-07-08 11:38:53 | slow_query | 10.101.1.98:53944   | cic_data_control | 'cic_data_control'@'%' | default_wg    | default_catalog | cic_data_center | EOF   |           |    545149 |  1482174110 |  51383570 |          5 | 10681235892 |    221573651 |   NULL |       1 | 172.16.224.48 | SELECT o.`id`, o.`allot_order_no`, DATE_FORMAT(o.`allot_out_time`,'%Y-%m-%d %H:%i:%S') allot_out_time, DATE_FORMAT(o.`allot_in_time`,'%Y-%m-%d %H:%i:%S') allot_in_time, o.`allot_in_store_code`, o.`allot_in_store_name`, o.`allot_out_store_code`, o.`allot_out_store_name`, o.`allot_type`, o.`allot_status`, o.`allot_reason_code`, o.`allot_reason_name`, o.`create_id`, DATE_FORMAT(o.`create_time`,'%Y-%m-%d %H:%i:%S') create_time, o.`confirm_id`, DATE_FORMAT(o.`confirm_time`,'%Y-%m-%d %H:%i:%S') confirm_time, o.`update_id`, DATE_FORMAT(o.`update_time`,'%Y-%m-%d %H:%i:%S') update_time, o.`modify_reason`, sum(if(d.room_code = 1 || d.room_code = 2 || d.room_code = 4,1,0)) roomCount, o.`del_flag` FROM `cic_allot_order` o JOIN `cic_allot_order_detail`d on o.allot_order_no = d.allot_order_no WHERE o.allot_out_store_code = 'HZH229' and o.allot_out_time <= FROM_UNIXTIME('1743350400','%Y-%m-%d %H:%i:%S') group by o.`id`, o.`allot_order_no`, o.allot_out_time, o.`allot_in_time`, o.`allot_in_store_code`, o.`allot_in_store_name`, o.`allot_out_store_code`, o.`allot_out_store_name`, o.`allot_type`, o.`allot_status`, o.`allot_reason_code`, o.`allot_reason_name`, o.`create_id`, o.create_time, o.`confirm_id`, o.confirm_time, o.`update_id`, o.update_time, o.`del_flag`, `o`.`modify_reason` order by o.create_time desc limit 0,5 | d7a24a254911216dcd878c2869741f5c | 2108897912.4280782 |  834142.7574013022 |
| 1529dbe5-5bad-11f0-8947-9cc2c42abc80 | 2025-07-08 11:38:59 | slow_query | 10.101.4.206:35638  | cic_data_control | 'cic_data_control'@'%' | default_wg    | default_catalog | cic_data_center | EOF   |           |    535413 |   861563796 |  15053359 |         10 |  1722444765 |     82945679 |   NULL |       1 | 172.16.224.49 | SELECT o.`id`, o.`allot_order_no`, DATE_FORMAT(o.`allot_out_time`,'%Y-%m-%d %H:%i:%S') allot_out_time, DATE_FORMAT(o.`allot_in_time`,'%Y-%m-%d %H:%i:%S') allot_in_time, o.`allot_in_store_code`, o.`allot_in_store_name`, o.`allot_out_store_code`, o.`allot_out_store_name`, o.`allot_type`, o.`allot_status`, o.`allot_reason_code`, o.`allot_reason_name`, o.`create_id`, DATE_FORMAT(o.`create_time`,'%Y-%m-%d %H:%i:%S') create_time, o.`confirm_id`, DATE_FORMAT(o.`confirm_time`,'%Y-%m-%d %H:%i:%S') confirm_time, o.`update_id`, DATE_FORMAT(o.`update_time`,'%Y-%m-%d %H:%i:%S') update_time, o.`modify_reason`, sum(if(d.room_code = 1 || d.room_code = 2 || d.room_code = 4,1,0)) roomCount, o.`del_flag` FROM `cic_allot_order` o JOIN `cic_allot_order_detail`d on o.allot_order_no = d.allot_order_no WHERE (o.allot_in_store_code = 'LA1067' or o.allot_out_store_code = 'LA1067') and o.allot_out_time <= FROM_UNIXTIME('1743350400','%Y-%m-%d %H:%i:%S') group by o.`id`, o.`allot_order_no`, o.allot_out_time, o.`allot_in_time`, o.`allot_in_store_code`, o.`allot_in_store_name`, o.`allot_out_store_code`, o.`allot_out_store_name`, o.`allot_type`, o.`allot_status`, o.`allot_reason_code`, o.`allot_reason_name`, o.`create_id`, o.create_time, o.`confirm_id`, o.confirm_time, o.`update_id`, o.update_time, o.`del_flag`, `o`.`modify_reason` order by o.create_time desc limit 0,10 | b8af48af355e7afadf8b0999c420d03c | 2110559952.4448957 | 1652492.7993279241 |
| 19767a1c-5bad-11f0-8ae4-3868dda12628 | 2025-07-08 11:39:06 | slow_query | 10.101.2.39:43968   | cic_data_control | 'cic_data_control'@'%' | default_wg    | default_catalog | cic_data_center | EOF   |           |    535150 |  1482125519 |  51383575 |          5 |  8395887993 |    189933740 |   NULL |       1 | 172.16.224.48 | SELECT o.`id`, o.`allot_order_no`, DATE_FORMAT(o.`allot_out_time`,'%Y-%m-%d %H:%i:%S') allot_out_time, DATE_FORMAT(o.`allot_in_time`,'%Y-%m-%d %H:%i:%S') allot_in_time, o.`allot_in_store_code`, o.`allot_in_store_name`, o.`allot_out_store_code`, o.`allot_out_store_name`, o.`allot_type`, o.`allot_status`, o.`allot_reason_code`, o.`allot_reason_name`, o.`create_id`, DATE_FORMAT(o.`create_time`,'%Y-%m-%d %H:%i:%S') create_time, o.`confirm_id`, DATE_FORMAT(o.`confirm_time`,'%Y-%m-%d %H:%i:%S') confirm_time, o.`update_id`, DATE_FORMAT(o.`update_time`,'%Y-%m-%d %H:%i:%S') update_time, o.`modify_reason`, sum(if(d.room_code = 1 || d.room_code = 2 || d.room_code = 4,1,0)) roomCount, o.`del_flag` FROM `cic_allot_order` o JOIN `cic_allot_order_detail`d on o.allot_order_no = d.allot_order_no WHERE o.allot_out_store_code = 'GZ3103' and o.allot_out_time <= FROM_UNIXTIME('1743350400','%Y-%m-%d %H:%i:%S') group by o.`id`, o.`allot_order_no`, o.allot_out_time, o.`allot_in_time`, o.`allot_in_store_code`, o.`allot_in_store_name`, o.`allot_out_store_code`, o.`allot_out_store_name`, o.`allot_type`, o.`allot_status`, o.`allot_reason_code`, o.`allot_reason_name`, o.`create_id`, o.create_time, o.`confirm_id`, o.confirm_time, o.`update_id`, o.update_time, o.`del_flag`, `o`.`modify_reason` order by o.create_time desc limit 0,5 | d7a24a254911216dcd878c2869741f5c | 2108898249.1733932 |  834142.8838305572 |
| 197408ee-5bad-11f0-9c5e-3868dda12610 | 2025-07-08 11:39:06 | slow_query | 10.101.2.39:43002   | cic_data_control | 'cic_data_control'@'%' | default_wg    | default_catalog | cic_data_center | EOF   |           |    532289 |  1482125117 |  51383564 |          5 |  8289342906 |    190375871 |   NULL |       1 | 172.16.224.47 | SELECT o.`id`, o.`allot_order_no`, DATE_FORMAT(o.`allot_out_time`,'%Y-%m-%d %H:%i:%S') allot_out_time, DATE_FORMAT(o.`allot_in_time`,'%Y-%m-%d %H:%i:%S') allot_in_time, o.`allot_in_store_code`, o.`allot_in_store_name`, o.`allot_out_store_code`, o.`allot_out_store_name`, o.`allot_type`, o.`allot_status`, o.`allot_reason_code`, o.`allot_reason_name`, o.`create_id`, DATE_FORMAT(o.`create_time`,'%Y-%m-%d %H:%i:%S') create_time, o.`confirm_id`, DATE_FORMAT(o.`confirm_time`,'%Y-%m-%d %H:%i:%S') confirm_time, o.`update_id`, DATE_FORMAT(o.`update_time`,'%Y-%m-%d %H:%i:%S') update_time, o.`modify_reason`, sum(if(d.room_code = 1 || d.room_code = 2 || d.room_code = 4,1,0)) roomCount, o.`del_flag` FROM `cic_allot_order` o JOIN `cic_allot_order_detail`d on o.allot_order_no = d.allot_order_no WHERE o.allot_out_store_code = 'GZ3103' and o.allot_out_time <= FROM_UNIXTIME('1743350400','%Y-%m-%d %H:%i:%S') group by o.`id`, o.`allot_order_no`, o.allot_out_time, o.`allot_in_time`, o.`allot_in_store_code`, o.`allot_in_store_name`, o.`allot_out_store_code`, o.`allot_out_store_name`, o.`allot_type`, o.`allot_status`, o.`allot_reason_code`, o.`allot_reason_name`, o.`create_id`, o.create_time, o.`confirm_id`, o.confirm_time, o.`update_id`, o.update_time, o.`del_flag`, `o`.`modify_reason` order by o.create_time desc limit 0,5 | d7a24a254911216dcd878c2869741f5c | 2108898249.1733932 |  834142.8838305572 |
| 18f059f3-5bad-11f0-9c5e-3868dda12610 | 2025-07-08 11:39:05 | slow_query | 172.16.224.48:60378 | cic_data_control | 'cic_data_control'@'%' | default_wg    | default_catalog | cic_data_center | EOF   |           |    531895 |     5900837 |    393768 |       1785 |  4102514476 |    510058362 |   NULL |       1 | 172.16.224.47 | SELECT store_code,brand_code,merchandise_jde_code,merchandise_jde_name,order_code,child_order_code,adjust_source,adjust_person,adjust_date,delivery_date,last_delivery_amount,adjust_amount,order_unit,order_unit_name,forecast_usage_amount,advise_order_amount,inventory_amount FROM ims_ordering_adjust_record WHERE (order_code = 'PS133920250630_W1' AND child_order_code = 'PS133920250707_O3' AND delivery_date = '2025-07-07' AND order_code = 'PS133920250630_W1')                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | 477b8f556a2b156c1e9b7d983407da13 | 118.23942406549568 |                  0 |
| 1bef699c-5bad-11f0-9c5e-3868dda12610 | 2025-07-08 11:39:10 | slow_query | 10.101.1.109:43158  | cic_data_control | 'cic_data_control'@'%' | default_wg    | default_catalog | cic_data_center | EOF   |           |    528127 |  1482059786 |  51383566 |          5 |  7304870316 |    183341619 |   NULL |       1 | 172.16.224.47 | SELECT o.`id`, o.`allot_order_no`, DATE_FORMAT(o.`allot_out_time`,'%Y-%m-%d %H:%i:%S') allot_out_time, DATE_FORMAT(o.`allot_in_time`,'%Y-%m-%d %H:%i:%S') allot_in_time, o.`allot_in_store_code`, o.`allot_in_store_name`, o.`allot_out_store_code`, o.`allot_out_store_name`, o.`allot_type`, o.`allot_status`, o.`allot_reason_code`, o.`allot_reason_name`, o.`create_id`, DATE_FORMAT(o.`create_time`,'%Y-%m-%d %H:%i:%S') create_time, o.`confirm_id`, DATE_FORMAT(o.`confirm_time`,'%Y-%m-%d %H:%i:%S') confirm_time, o.`update_id`, DATE_FORMAT(o.`update_time`,'%Y-%m-%d %H:%i:%S') update_time, o.`modify_reason`, sum(if(d.room_code = 1 || d.room_code = 2 || d.room_code = 4,1,0)) roomCount, o.`del_flag` FROM `cic_allot_order` o JOIN `cic_allot_order_detail`d on o.allot_order_no = d.allot_order_no WHERE o.allot_in_store_code = 'GZ3103' and o.allot_out_time <= FROM_UNIXTIME('1743350400','%Y-%m-%d %H:%i:%S') group by o.`id`, o.`allot_order_no`, o.allot_out_time, o.`allot_in_time`, o.`allot_in_store_code`, o.`allot_in_store_name`, o.`allot_out_store_code`, o.`allot_out_store_name`, o.`allot_type`, o.`allot_status`, o.`allot_reason_code`, o.`allot_reason_name`, o.`create_id`, o.create_time, o.`confirm_id`, o.confirm_time, o.`update_id`, o.update_time, o.`del_flag`, `o`.`modify_reason` order by o.create_time desc limit 0,5 | 5060bec68031e3d0470da2aa1f96f39d | 2108868155.9422026 |  819344.4809862227 |
| 1b4baf70-5bad-11f0-8ae4-3868dda12628 | 2025-07-08 11:39:09 | slow_query | 172.16.224.48:48916 | cic_data_control | 'cic_data_control'@'%' | default_wg    | default_catalog | cic_data_center | EOF   |           |    527992 |     5774853 |    394308 |       1046 |  4088712997 |    454412543 |   NULL |       1 | 172.16.224.48 | SELECT store_code,brand_code,merchandise_jde_code,merchandise_jde_name,order_code,child_order_code,adjust_source,adjust_person,adjust_date,delivery_date,last_delivery_amount,adjust_amount,order_unit,order_unit_name,forecast_usage_amount,advise_order_amount,inventory_amount FROM ims_ordering_adjust_record WHERE (order_code = 'PBJ29220250630_W1' AND child_order_code = 'PBJ29220250707_O3' AND delivery_date = '2025-07-07' AND order_code = 'PBJ29220250630_W1')                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | 477b8f556a2b156c1e9b7d983407da13 | 118.23942406549568 |                  0 |
| 20162fa2-5bad-11f0-8947-9cc2c42abc80 | 2025-07-08 11:39:17 | slow_query | 172.16.224.48:57756 | cic_data_control | 'cic_data_control'@'%' | default_wg    | default_catalog | cic_data_center | EOF   |           |    519756 |     2301986 |    279620 |        317 |  3300772013 |    447954921 |   NULL |       1 | 172.16.224.49 | SELECT store_code,brand_code,merchandise_jde_code,merchandise_jde_name,order_code,child_order_code,adjust_source,adjust_person,adjust_date,delivery_date,last_delivery_amount,adjust_amount,order_unit,order_unit_name,forecast_usage_amount,advise_order_amount,inventory_amount FROM ims_ordering_adjust_record WHERE (order_code = 'PB702620250707_W1' AND child_order_code = 'PB702620250709_O5' AND delivery_date = '2025-07-09' AND order_code = 'PB702620250707_W1')                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | 477b8f556a2b156c1e9b7d983407da13 | 118.23942406549568 |                  0 |
| 26c3ef45-5bad-11f0-8ae4-3868dda12628 | 2025-07-08 11:39:28 | slow_query | 10.101.1.98:35236   | cic_data_control | 'cic_data_control'@'%' | default_wg    | default_catalog | cic_data_center | EOF   |           |    514768 |  4485572456 |  50910187 |         10 |  9227772123 |    352843147 |   NULL |       1 | 172.16.224.48 | SELECT o.`id`, o.`allot_order_no`, DATE_FORMAT(o.`allot_out_time`,'%Y-%m-%d %H:%i:%S') allot_out_time, DATE_FORMAT(o.`allot_in_time`,'%Y-%m-%d %H:%i:%S') allot_in_time, o.`allot_in_store_code`, o.`allot_in_store_name`, o.`allot_out_store_code`, o.`allot_out_store_name`, o.`allot_type`, o.`allot_status`, o.`allot_reason_code`, o.`allot_reason_name`, o.`create_id`, DATE_FORMAT(o.`create_time`,'%Y-%m-%d %H:%i:%S') create_time, o.`confirm_id`, DATE_FORMAT(o.`confirm_time`,'%Y-%m-%d %H:%i:%S') confirm_time, o.`update_id`, DATE_FORMAT(o.`update_time`,'%Y-%m-%d %H:%i:%S') update_time, o.`modify_reason`, sum(if(d.room_code = 1 || d.room_code = 2 || d.room_code = 4,1,0)) roomCount, o.`del_flag` FROM `cic_allot_order` o JOIN `cic_allot_order_detail`d on o.allot_order_no = d.allot_order_no WHERE (o.allot_in_store_code = 'HZH129' or o.allot_out_store_code = 'HZH129') and o.allot_out_time <= FROM_UNIXTIME('1743350400','%Y-%m-%d %H:%i:%S') group by o.`id`, o.`allot_order_no`, o.allot_out_time, o.`allot_in_time`, o.`allot_in_store_code`, o.`allot_in_store_name`, o.`allot_out_store_code`, o.`allot_out_store_name`, o.`allot_type`, o.`allot_status`, o.`allot_reason_code`, o.`allot_reason_name`, o.`create_id`, o.create_time, o.`confirm_id`, o.confirm_time, o.`update_id`, o.update_time, o.`del_flag`, `o`.`modify_reason` order by o.create_time desc limit 0,10 | b8af48af355e7afadf8b0999c420d03c | 2110560289.4866414 | 1652493.0498494804 |
| 249f134b-5bad-11f0-8ae4-3868dda12628 | 2025-07-08 11:39:25 | slow_query | 172.16.224.48:51549 | cic_data_control | 'cic_data_control'@'%' | default_wg    | default_catalog | cic_data_center | EOF   |           |    512346 |     5900837 |    393768 |       1785 |  3784587260 |    428658285 |   NULL |       1 | 172.16.224.48 | SELECT store_code,brand_code,merchandise_jde_code,merchandise_jde_name,order_code,child_order_code,adjust_source,adjust_person,adjust_date,delivery_date,last_delivery_amount,adjust_amount,order_unit,order_unit_name,forecast_usage_amount,advise_order_amount,inventory_amount FROM ims_ordering_adjust_record WHERE (order_code = 'PS133920250630_W1' AND child_order_code = 'PS133920250707_O3' AND delivery_date = '2025-07-07' AND order_code = 'PS133920250630_W1')                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | 477b8f556a2b156c1e9b7d983407da13 | 118.23942406549568 |                  0 |
+--------------------------------------+---------------------+------------+---------------------+------------------+------------------------+---------------+-----------------+-----------------+-------+-----------+-----------+-------------+-----------+------------+-------------+--------------+--------+---------+---------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+--------------------+--------------------+
20 rows in set (0.44 sec)

第20个slow_query 耗时 512346 ms,换算成秒为 512.346秒。

五、7月10日的9:30-10:30 慢查信息

智能货物172.25.214.4864C/256G
智能货物172.25.214.4964C/256G
智能货物172.25.214.5064C/256G
mysql> select *  from starrocks_audit_tbl__  where `time` between '2025-07-10 09:30:00' and '2025-07-10 10:30:59' order by `query_time` desc limit 20;
+--------------------------------------+---------------------+----------------------+------------------+-----------------+-------+------------+------------+-----------+-------------+-------------+----------------+---------+----------+---------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+
| query_id                             | time                | client_ip            | user             | db              | state | query_time | scan_bytes | scan_rows | return_rows | cpu_cost_ns | mem_cost_bytes | stmt_id | is_query | frontend_ip   | stmt| digest |
+--------------------------------------+---------------------+----------------------+------------------+-----------------+-------+------------+------------+-----------+-------------+-------------+----------------+---------+----------+---------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+
| 0fa9a4f3-5d2e-11f0-a8fa-b4055d65b6f6 | 2025-07-10 09:34:46 | 172.25.237.51:48328  | onedata_readonly | cic_data_center | EOF   |         47 |     990525 |     21633 |           1 |    35936332 |        4797856 | 1644909 |        1 | 172.25.214.50 | SELECT COUNT(1) FROM rl_ss2_t_standard_store_report_data WHERE business_date = CURDATE();|        |
| adbb9ae3-5d2d-11f0-96b4-b4055d65ad68 | 2025-07-10 09:32:01 | 172.25.102.145:59614 | onedata_readonly | cic_data_center | EOF   |         25 |    4219714 |    547696 |           1 |    24195232 |        2703786 | 5209700 |        1 | 172.25.214.48 | SELECT SUM(lock_amount) FROM fbi_t_order_record WHERE type IN (1,2) AND standard_product_code = 'B0228F'|        |
| f50e6cc7-5d2d-11f0-96b4-b4055d65ad68 | 2025-07-10 09:34:01 | 172.25.102.145:59648 | onedata_readonly | cic_data_center | EOF   |         24 |    4219714 |    547696 |           1 |    26712410 |        3166367 | 5209707 |        1 | 172.25.214.48 | SELECT SUM(lock_amount) FROM fbi_t_order_record WHERE type IN (1,2) AND standard_product_code = 'B0228F'|        |
| 89c84423-5d2d-11f0-96b4-b4055d65ad68 | 2025-07-10 09:31:01 | 172.25.102.145:59594 | onedata_readonly | cic_data_center | EOF   |         23 |    4219714 |    547696 |           1 |    20950831 |        2949804 | 5209697 |        1 | 172.25.214.48 | SELECT SUM(lock_amount) FROM fbi_t_order_record WHERE type IN (1,2) AND standard_product_code = 'B0228F'|        |
| d1ad6afd-5d2d-11f0-96b4-b4055d65ad68 | 2025-07-10 09:33:02 | 172.25.102.145:59630 | onedata_readonly | cic_data_center | EOF   |         21 |    4219714 |    547696 |           1 |    20519945 |        2914792 | 5209703 |        1 | 172.25.214.48 | SELECT SUM(lock_amount) FROM fbi_t_order_record WHERE type IN (1,2) AND standard_product_code = 'B0228F'|        |
| f111bf8d-5d34-11f0-96b4-b4055d65ad68 | 2025-07-10 10:24:01 | 172.25.102.145:60604 | onedata_readonly | cic_data_center | EOF   |         21 |    4219714 |    547696 |           1 |    17057729 |        2596940 | 5218374 |        1 | 172.25.214.48 | SELECT SUM(lock_amount) FROM fbi_t_order_record WHERE type IN (1,2) AND standard_product_code = 'B0228F'|        |
| a44c783c-5d35-11f0-96b4-b4055d65ad68 | 2025-07-10 10:29:01 | 172.25.102.145:60698 | onedata_readonly | cic_data_center | EOF   |         20 |    4219714 |    547696 |           1 |    24059764 |        2484945 | 5218394 |        1 | 172.25.214.48 | SELECT SUM(lock_amount) FROM fbi_t_order_record WHERE type IN (1,2) AND standard_product_code = 'B0228F'|        |
| 66464cc9-5d2d-11f0-96b4-b4055d65ad68 | 2025-07-10 09:30:01 | 172.25.102.145:59558 | onedata_readonly | cic_data_center | EOF   |         19 |    4219714 |    547696 |           1 |    18842650 |        2861571 | 5209691 |        1 | 172.25.214.48 | SELECT SUM(lock_amount) FROM fbi_t_order_record WHERE type IN (1,2) AND standard_product_code = 'B0228F'|        |
| 3e7a24b5-5d34-11f0-96b4-b4055d65ad68 | 2025-07-10 10:19:01 | 172.25.102.145:60504 | onedata_readonly | cic_data_center | EOF   |         18 |    4219714 |    547696 |           1 |    20624144 |        3061003 | 5218353 |        1 | 172.25.214.48 | SELECT SUM(lock_amount) FROM fbi_t_order_record WHERE type IN (1,2) AND standard_product_code = 'B0228F'|        |
| 998aac3e-5d34-11f0-94e8-b4055d65b4b6 | 2025-07-10 10:21:34 | 172.25.148.105:52356 | ciCDatacenTer    |                 | EOF   |          9 |          0 |         0 |           1 |      143393 |          12696 |   19238 |        1 | 172.25.214.49 | /* mysql-connector-java-5.1.49 ( Revision: ad86f36e100e104cd926c6b81c8cab9565750116 ) */SELECT @@session.auto_increment_increment AS auto_increment_increment, @@character_set_client AS character_set_client, @@character_set_connection AS character_set_connection, @@character_set_results AS character_set_results, @@character_set_server AS character_set_server, @@collation_server AS collation_server, @@collation_connection AS collation_connection, @@init_connect AS init_connect, @@interactive_timeout AS interactive_timeout, @@language AS language, @@license AS license, @@lower_case_table_names AS lower_case_table_names, @@max_allowed_packet AS max_allowed_packet, @@net_buffer_length AS net_buffer_length, @@net_write_timeout AS net_write_timeout, @@query_cache_size AS query_cache_size, @@query_cache_type AS query_cache_type, @@sql_mode AS sql_mode, @@system_time_zone AS system_time_zone, @@time_zone AS time_zone, @@tx_isolation AS transaction_isolation, @@wait_timeout AS wait_timeout |        |
| b2f8b337-5d2d-11f0-96b4-b4055d65ad68 | 2025-07-10 09:32:10 | 172.16.74.117:39548  | omsreadonly      | cic_data_center | EOF   |          6 |          0 |         0 |           1 |       47588 |           3888 | 5209701 |        1 | 172.25.214.48 | select 1|        |
| e1caefd4-5d2d-11f0-96b4-b4055d65ad68 | 2025-07-10 09:33:29 | 172.25.223.61:55068  | omsreadonly      | cic_data_center | EOF   |          5 |          0 |         0 |           1 |      123546 |           3888 | 5209706 |        1 | 172.25.214.48 | select 1|        |
| 6b70c77d-5d2d-11f0-96b4-b4055d65ad68 | 2025-07-10 09:30:10 | 172.16.74.117:39548  | omsreadonly      | cic_data_center | EOF   |          3 |          0 |         0 |           1 |       55035 |           3888 | 5209692 |        1 | 172.25.214.48 | select 1|        |
| 6c4e081f-5d2d-11f0-96b4-b4055d65ad68 | 2025-07-10 09:30:12 | 172.25.236.190:38472 | omsreadonly      | cic_data_center | EOF   |          3 |          0 |         0 |           1 |       65041 |           3888 | 5209693 |        1 | 172.25.214.48 | select 1|        |
| be070d89-5d2d-11f0-96b4-b4055d65ad68 | 2025-07-10 09:32:29 | 172.25.223.61:55068  | omsreadonly      | cic_data_center | EOF   |          3 |          0 |         0 |           1 |       62701 |           3888 | 5209702 |        1 | 172.25.214.48 | select 1|        |
| 427a9104-5d2f-11f0-96b4-b4055d65ad68 | 2025-07-10 09:43:20 | 172.25.208.121:52912 | omsreadonly      | cic_data_center | EOF   |          3 |          0 |         0 |           1 |       58473 |           3888 | 5209802 |        1 | 172.25.214.48 | select 1|        |
| 9a43042c-5d2d-11f0-96b4-b4055d65ad68 | 2025-07-10 09:31:29 | 172.25.223.61:55068  | omsreadonly      | cic_data_center | EOF   |          3 |          0 |         0 |           1 |       53440 |           3888 | 5209699 |        1 | 172.25.214.48 | select 1|        |
| 77c0c997-5d2d-11f0-96b4-b4055d65ad68 | 2025-07-10 09:30:31 | 172.25.236.190:38472 | omsreadonly      | cic_data_center | EOF   |          3 |          0 |         0 |           1 |       44075 |           3888 | 5209696 |        1 | 172.25.214.48 | select 1|        |
| 767efac6-5d2d-11f0-96b4-b4055d65ad68 | 2025-07-10 09:30:29 | 172.25.223.61:55068  | omsreadonly      | cic_data_center | EOF   |          3 |          0 |         0 |           1 |      116856 |           3888 | 5209695 |        1 | 172.25.214.48 | select 1|        |
| 949de627-5d2e-11f0-96b4-b4055d65ad68 | 2025-07-10 09:38:29 | 172.25.223.61:55068  | omsreadonly      | cic_data_center | EOF   |          3 |          0 |         0 |           1 |       74687 |           3888 | 5209725 |        1 | 172.25.214.48 | select 1|        |
+--------------------------------------+---------------------+----------------------+------------------+-----------------+-------+------------+------------+-----------+-------------+-------------+----------------+---------+----------+---------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+
20 rows in set (0.08 sec)

六、7月10日的9:30-10:30 ent3的磁盘使用率100%的问题

【ent3】

智能货物172.25.214.4864C/256G
智能货物172.25.214.4964C/256G
智能货物172.25.214.5064C/256G
  1. BE磁盘IOPS监控

infra-grafana.hwwt2.com/d/1fFiWJ4m1…

磁盘的IOPS性能只能到1600

  1. be上的info日志
I0710 09:35:09.457609 87165 size_tiered_compaction_policy.cpp:312] pick tablet 17854532 for size-tiered compaction rowset version=216506-217390 score=17.7046 level_size=29512 
total_size=39909 segment_num=9 force_base_compaction=0 reached_max_versions=0                                                                                                  
I0710 09:35:09.530028 27569 data_consumer.cpp:73] init kafka consumer with group id: ims.cic.group.xfz                                                                         
I0710 09:35:09.615615 27563 data_consumer.cpp:73] init kafka consumer with group id: ims.wdd.group.ks                                                                          
W0710 09:35:09.661826 25791 tablet_sink.cpp:1824] close channel failed. channel_name=NodeChannel[10066], load_info=load_id=fa2c0d98-8aff-4d36-95b0-9d9aca991708, txn_id: 102314
8467, parallel=1, compress_type=2, error_msg=[E1008]Reached timeout=30000ms @172.25.214.49:9056                                                                                
W0710 09:35:09.661878 25791 tablet_sink.cpp:1824] close channel failed. channel_name=NodeChannel[10003], load_info=load_id=fa2c0d98-8aff-4d36-95b0-9d9aca991708, txn_id: 102314
8467, parallel=1, compress_type=2, error_msg=[E1008]Reached timeout=30000ms @172.25.214.50:9056                                                                                
I0710 09:35:09.661945 25791 tablet_sink.cpp:712] OlapTableSink txn_id: 1023148467 load_id: fa2c0d98-8aff-4d36-95b0-9d9aca991708 commit 12 tablets: 17853569,17853573,17853577,1
7853593,17853557,17853585,17853561,17853589,17853553,17853565,17853581,17853597                                                                                                
I0710 09:35:09.662088 25791 tablet_sink.cpp:1858] Olap table sink statistics. load_id: fa2c0d98-8aff-4d36-95b0-9d9aca991708, txn_id: 1023148467, add chunk time(ms)/wait lock t
ime(ms)/num: {10067:(265)(0)(1)} {10003:(0)(0)(0)} {10066:(0)(0)(0)}                                                                                                           
W0710 09:35:09.662863 25791 plan_fragment_executor.cpp:204] Fail to open fragment, instance_id=fa2c0d98-8aff-4d36-95b0-9d9aca991709, status=Internal error: [E1008]Reached time
out=30000ms @172.25.214.50:9056                                                                                                                                                
/build/starrocks/be/src/exec/tablet_sink.cpp:724 _wait_request(closure)                                                                                                        
/build/starrocks/be/src/exec/tablet_sink.cpp:820 _wait_all_prev_request()                                                                                                      
W0710 09:35:09.662988 25791 fragment_mgr.cpp:200] Fail to open fragment fa2c0d98-8aff-4d36-95b0-9d9aca991709: Internal error: [E1008]Reached timeout=30000ms @172.25.214.50:905
6                                                                                                                                                                              
/build/starrocks/be/src/exec/tablet_sink.cpp:724 _wait_request(closure)                                                                                                        
/build/starrocks/be/src/exec/tablet_sink.cpp:820 _wait_all_prev_request()                                                                                                      
I0710 09:35:09.663199 25791 plan_fragment_executor.cpp:492] Fragment fa2c0d98-8aff-4d36-95b0-9d9aca991709:(Active: 30s503ms, non-child: 0.00%)                                 
   - InstanceAllocatedMemoryUsage: 401.11 KB                                                                                                                                   
   - InstanceDeallocatedMemoryUsage: 283.22 KB                                                                                                                                 
   - InstancePeakMemoryUsage: 117.89 KB                                                                                                                                        
   - MemoryLimit: 2.00 GB                                                                                                                                                      
   - RowsProduced: 16                                                                                                                                                          
  OlapTableSink:(Active: 30s009ms, non-child: 98.38%)                                                                                                                          
     - TxnID: 1023148467                                                                                                                                                       
     - IndexNum: 1                                                                                                                                                             
     - ReplicatedStorage: false                                                                                                                                                
     - AutomaticPartition: false                                                                                                                                               
     - AllocAutoIncrementTime: 150.000ns                                                                                                                                       
     - CloseWaitTime: 30s004ms                                                                                                                                                 
:                                 

3. be上的warn日志

W0710 10:19:19.072778 25794 tablet_sink.cpp:1824] close channel failed. channel_name=NodeChannel[10067], load_info=load_id=71867f60-8209-4003-a67d-4e910cd4ca14, txn_id: 1023152619, parallel=1, compress_type=2, error_msg=[E1008]Reached timeout=30000ms @172.25.214.48:9056
W0710 10:19:19.072803 25794 tablet_sink.cpp:1824] close channel failed. channel_name=NodeChannel[10066], load_info=load_id=71867f60-8209-4003-a67d-4e910cd4ca14, txn_id: 1023152619, parallel=1, compress_type=2, error_msg=[E1008]Reached timeout=30000ms @172.25.214.49:9056
W0710 10:19:19.073199 25794 plan_fragment_executor.cpp:204] Fail to open fragment, instance_id=71867f60-8209-4003-a67d-4e910cd4ca15, status=Internal error: [E1008]Reached timeout=30000ms @172.25.214.49:9056
/build/starrocks/be/src/exec/tablet_sink.cpp:724 _wait_request(closure)
/build/starrocks/be/src/exec/tablet_sink.cpp:820 _wait_all_prev_request()
W0710 10:19:19.073300 25794 fragment_mgr.cpp:200] Fail to open fragment 71867f60-8209-4003-a67d-4e910cd4ca15: Internal error: [E1008]Reached timeout=30000ms @172.25.214.49:9056
/build/starrocks/be/src/exec/tablet_sink.cpp:724 _wait_request(closure)
/build/starrocks/be/src/exec/tablet_sink.cpp:820 _wait_all_prev_request()
W0710 10:19:19.073439 25794 stream_load_executor.cpp:102] fragment execute failed, query_id=71867f6082094003-a67d4e910cd4ca14, err_msg=[E1008]Reached timeout=30000ms @172.25.214.49:9056, id=71867f6082094003-a67d4e910cd4ca14, job_id=17261299, txn_id: 1023152619, label=ims_ordering_adjust_record_routine-17261299-71867f60-8209-4003-a67d-4e910cd4ca14-1023152619, db=cic_data_center
W0710 10:19:19.073464 27224 routine_load_task_executor.cpp:478] consume failed
W0710 10:19:19.983877 25797 tablet_sink.cpp:1824] close channel failed. channel_name=NodeChannel[10067], load_info=load_id=b7f6f8e4-7458-4747-be90-20c726ba7da3, txn_id: 1023152622, parallel=1, compress_type=2, error_msg=[E1008]Reached timeout=30000ms @172.25.214.48:9056
W0710 10:19:19.983903 25797 tablet_sink.cpp:1824] close channel failed. channel_name=NodeChannel[10066], load_info=load_id=b7f6f8e4-7458-4747-be90-20c726ba7da3, txn_id: 1023152622, parallel=1, compress_type=2, error_msg=[E1008]Reached timeout=30000ms @172.25.214.49:9056
W0710 10:19:19.984367 25797 plan_fragment_executor.cpp:204] Fail to open fragment, instance_id=b7f6f8e4-7458-4747-be90-20c726ba7da4, status=Internal error: [E1008]Reached timeout=30000ms @172.25.214.49:9056
/build/starrocks/be/src/exec/tablet_sink.cpp:724 _wait_request(closure)
/build/starrocks/be/src/exec/tablet_sink.cpp:820 _wait_all_prev_request()
W0710 10:19:19.984437 25797 fragment_mgr.cpp:200] Fail to open fragment b7f6f8e4-7458-4747-be90-20c726ba7da4: Internal error: [E1008]Reached timeout=30000ms @172.25.214.49:9056
/build/starrocks/be/src/exec/tablet_sink.cpp:724 _wait_request(closure)
/build/starrocks/be/src/exec/tablet_sink.cpp:820 _wait_all_prev_request()

【ent4】

磁盘IOPS最高能到6000

【问题点】

  1. ent3的磁盘性能需要确认,2站的磁盘能力是否相同。

  2. be节点响应时间超过30s,导致flink写入报错。

  3. be数据冷热分离的配置

【优化】

  1. flink加入重试机制
  2. 加大flink中starrocks sink超时参数
  3. 优化be性能,增加be节点分散写入压力,检查磁盘IO能力
  4. be.conf 的storage_root_path 参数ssd盘添加参数,medium:SSD
  5. 增加compaction的线程数
cumulative_compaction_num_threads_per_disk = 4
base_compaction_num_threads_per_disk = 2

七、

# TOP5 慢查
use starrocks_audit_db__

select *  from starrocks_audit_tbl__  where `timestamp` between '2025-07-08 00:00:00' and '2025-07-08 23:59:59' order by queryTime desc limit 3\G


# 库表信息
starrocks_audit_db__.starrocks_audit_tbl__