1Z0-873 · Question #65
Which two of the following statements best describe the purpose of the slow query log and how you enable it?
The correct answer is B. The slow log records the text of all queries that exceed the long_query_time variable. C. The slow log is enabled with the --log-slow-queries or --log-slow-queries=file_name option. The slow query log contains the text of queries that take a long time to execute, as well as information about their execution status. By default, "a long time" is more than 10 seconds. This can be changed by setting the long_query_time server variable. The server writes…
Question
Which two of the following statements best describe the purpose of the slow query log and how you enable it?
Options
- AThe slow log records the timestamps of when the server is performing slowly and when it is low
- BThe slow log records the text of all queries that exceed the long_query_time variable.
- CThe slow log is enabled with the --log-slow-queries or --log-slow-queries=file_name option.
- DThe slow log is enabled with the --log-slow or --log-slow=file_name option.
How the community answered
(40 responses)- A8% (3)
- B73% (29)
- D20% (8)
Explanation
The slow query log contains the text of queries that take a long time to execute, as well as information about their execution status. By default, "a long time" is more than 10 seconds. This can be changed by setting the long_query_time server variable. The server writes queries to this log after they finish because execution time is not known until then. To enable the slow query log, use the --log-slow-queries or --log-slow-queries=file_name option. If no filename is given, the default name is host_name-slow.log, where host_name stands for the server hostname.
Topics
Community Discussion
No community discussion yet for this question.