What logs does INFORMATION_SCHEMA.CLUSTER_SLOW_QUERY parse?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: INFORMATION_SCHEMA.CLUSTER_SLOW_QUERY会 解析哪些日志?

| username: 裤衩儿飞上天

【TiDB Usage Environment】Production Environment
【TiDB Version】4.0.8
【Encountered Problem: Phenomenon and Impact】
What logs does INFORMATION_SCHEMA.CLUSTER_SLOW_QUERY parse?
Besides parsing tidb_slow_query.log, does it also parse files like tidb_slow_query-2023-01-07T01-21-27.674.log?
Configuration is as follows:

TiDB root@ip:INFORMATION_SCHEMA> show variables like 'tidb_slow%'
+-------------------------+-------------------------+
| Variable_name           | Value                   |
+-------------------------+-------------------------+
| tidb_slow_log_masking   | 0                       |
| tidb_slow_log_threshold | 300                     |
| tidb_slow_query_file    | log/tidb_slow_query.log |
+-------------------------+-------------------------+
3 rows in set
Time: 0.022s
TiDB root@ip:INFORMATION_SCHEMA>
tidb_slow_query-2023-01-07T01-21-27.674.log
tidb_slow_query-2023-01-14T01-39-39.632.log
tidb_slow_query-2023-01-19T02-45-17.557.log
tidb_slow_query-2023-01-29T01-04-57.913.log
tidb_slow_query-2023-02-06T01-03-31.728.log
tidb_slow_query.log
| username: 啦啦啦啦啦 | Original post link

You can specify a time range

| username: 裤衩儿飞上天 | Original post link

Okay, thank you~

| username: 裤衩儿飞上天 | Original post link

If the query execution time period is in the current slow log file, will it only query the current slow log file, or will it also scan the rotated slow logs?

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.