Where are the logs for the parameters tidb_expensive_query_time_threshold and tidb_expensive_txn_time_threshold stored?

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

Original topic: 关于tidb_expensive_query_time_threshold和tidb_expensive_txn_time_threshold这两个参数的日志是放在哪里

| username: terry0219

Where are the logs generated by the parameters tidb_expensive_query_time_threshold and tidb_expensive_txn_time_threshold stored? I want to simulate a long transaction SQL to see if it gets recorded.

| username: 啦啦啦啦啦 | Original post link

You can filter the keyword “expensive” in the tidb.log.

| username: 哈喽沃德 | Original post link

Check if this setting is enabled in the configuration file; it is disabled by default.

| username: 有猫万事足 | Original post link

This parameter has existed before, with a default value of 60 seconds, though it might not have been called by this name. I don’t know where the statement “default is not enabled” comes from.

| username: Kongdom | Original post link

The logs controlled by these two parameters should be in tidb.log.

| username: dba远航 | Original post link

In the tidb.log, filter the keyword “expensive”.

| username: system | Original post link

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