doris2.0.15 在 /current_query_stmts中一直有系统查询,请问是做什么的?

Viewed 40

查看doris系统信息
image.png
一直有__internal_schema库的慢查询
请问:
1 这个是做什么使用的?
2 是否可以停止这种查询?怎么停掉?

audit.log

2024-11-08 13:03:26,918 [slow_query] |Client=|User=root|Db=__internal_schema|State=OK|ErrorCode=0|ErrorMessage=|Time(ms)=2432661|ScanBytes=60860547072|ScanRows=6705788058|ReturnRows=0|StmtId=0|QueryId=b7ac3b0d65014c0e-ac10a7c60f89cf2e|IsQuery=true|isNereids=true|feIp=10.129.77.111|Stmt=OriginStatement{originStmt='SELECT CONCAT('129734', '-', '-1', '-', 'test_col') AS id, 0 AS catalog_id, 34971 AS db_id, 129734 AS tbl_id, -1 AS idx_id, 'test_col' AS col_id, NULL AS part_id, 389260453871 AS row_count, SUM(t1.count) * COUNT(1) / (SUM(t1.count) - SUM(IF(t1.count = 1, 1, 0)) + SUM(IF(t1.count = 1, 1, 0)) * SUM(t1.count) / 389260453871) as ndv, IFNULL(SUM(IF(t1.column_key IS NULL, t1.count, 0)), 0) * 10.178615696103263 as null_count, SUBSTRING(CAST('2024-08-10 12:00:00' AS STRING), 1, 1024) AS min, SUBSTRING(CAST('2024-11-08 23:52:24' AS STRING), 1, 1024) AS max, SUM(t1.count) * 8 * 10.178615696103263 AS data_size, NOW() FROM ( SELECT t0.test_col as column_key, COUNT(1) as count FROM (SELECT test_col FROM internal.default_cluster:test_db.test_table TABLET(209103, 209431, 209791, 210151, 210507, 210891, 211211, 211599, 211931, 212279, 212643, 213011, 213839, 214203, 214563, 214927, 215291, 215639, 215983, 216335, 216723, 217071, 217407, 217759, 218131, 218483, 218847, 219187, 219559, 219927, 220247, 220615, 220979, 221343, 221707, 222059, 222903, 224824, 226353, 227154, 227807, 228317, 228942, 229764, 230558, 231408, 232303, 232926, 233560, 233997, 234494, 234975, 235347, 235912, 236410, 236820, 237198, 237562, 237920, 2383........ 1879404) ) as t0 GROUP BY t0.test_col ) as t1 ', idx=0}|CpuTimeMS=963906|SqlHash=null|peakMemoryBytes=32329944|SqlDigest=d41d8cd98f00b204e9800998ecf8427e|TraceId=|WorkloadGroup=|FuzzyVariables=

1 Answers
  1. 这个是在做自动统计信息收集,从 2.0 版本开始,Doris 在优化器中加入了 CBO 的能力。统计信息是 CBO 的基石,其准确性直接决定了代价估算的准确性,对于选择最优 Plan 至关重要。
  2. 可以通过这个命令关掉,会对查询性能有一定影响
    Set global enable_auto_analyze = false