跳至主要內容

慢查询管理

...小于 1 分钟

慢查询管理

IoTDB 会将慢查询输出到单独的日志文件 log_datanode_slow_sql.log 中,并记录其执行耗时。

配置慢查询的阈值

IoTDB 在 iotdb-common.properties 提供了 slow_query_threshold 配置项,单位是毫秒,默认是30秒,超过此参数指定的阈值,便会被判断为慢查询,待其查询执行结束后,将其记录在 log_datanode_slow_sql.log 中。

慢查询日志示例

2023-07-31 20:15:00,533 [pool-27-IoTDB-ClientRPC-Processor-1$20230731_121500_00003_1] INFO  o.a.i.d.q.p.Coordinator:225 - Cost: 42593 ms, sql is select * from root.db.** 

Copyright © 2024 The Apache Software Foundation.
Apache and the Apache feather logo are trademarks of The Apache Software Foundation

Have a question? Connect with us on QQ, WeChat, or Slack. Join the community now.