long_query_time
value are recorded in slow logs.long_query_time
value of TDSQL-C for MySQL defaults to 10, indicating that SQL statements running more than 10 seconds will be recorded in slow logs. You can adjust the value in the range of 0.000000 to 3,600.000000. For more information, see Setting Instance Parameters.Operation | Use Case | Method |
Prevent slow logs from being generated | Get suggestions from DBbrain for slow SQL statement optimization. | - |
Set slow log parameters | Set the value of `long_query_time` to record slow logs. | |
View slow log monitoring alarms | View slow instance queries through the instance monitoring metric (Slow Queries) and set alarms to receive notifications. | |
Query and download slow log details | On the **Operation Log** page, query the following slow log information: execution time, SQL statement, client address, username, database, execution duration (s), lock duration (s), parsed rows, and returned rows. You can download them in CSV or native formats. | - |
Analyze and optimize slow logs | View the complete SQL template, SQL sample, and optimization suggestion and description through DBbrain to analyze and optimize SQL statements. |
Was this page helpful?