MySQL Database Operations
- Usage of aggregates in WHERE clause is not allowed.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
The usage of aggregates inside ‘WHERE’ clauses is not allowed. For example, the following statement will not work : ‘SELECT * FROM my_table WHERE attribute_name = MAX(attribute_name)’, because the MAX value is not known yet.
- The logging option to enable binary log index file is ______________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
The ‘–log-bin-index’ is the logging option that enables the binary log index file. ‘–log-error’ enables the error log file. Similarly, –log enables the general log file.
- The default value in seconds in the system variable ‘long_query_time’ is ______________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
The server maintains a ‘long_query_time’ system variable that defines slow queries (10 seconds by default). If a query takes more than these seconds of real time it is considered slow.
- The log that identifies statements that may be in need of being rewritten for better performance is ______________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
The purpose of the slow-query log is to help the identification of statements that may be in need of being rewritten for better performance. This helps in query optimizations.
- The log that contains a record of server startups and shutdowns and the messages about exceptional conditions is ______________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
The error log contains a record of server startups and shutdowns and the messages about problems or exceptional conditions. If the server fails to start this log provides the help.