MySQL Optimization
- The system variable to maintain InnoDB log buffer size is _________________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
The InnoDB storage engine has its own cache used for buffering the data and index values. It maintains a log buffer. The size for this is controlled by innodb_log_buffer_size.
- All queries can be cached.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
A query is not cached if the query returns non deterministic results. For example, a query that uses the NOW() function returns different results over time. Therefore, it cannot be cached.
- To determine whether query cache is supported by the server the variable is _________________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
In MySQL, in order to determine whether a server supports the query cache or not, the value of the ‘have_query_cache’ system variable is checked. It returns ‘YES’ if support is available.
- Which mode tells not to cache query results?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
The have_query_cache system variable is used to check whether there is support for query cache. The mode ‘0’ tells not to cache the query results or to retrieve the cached results.
- Which mode tells cache queries that begin with SELECT SQL_CACHE?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
The have_query_cache system variable is used to check whether there is support for query cache. The mode ‘2’ tells cache only those queries that begin with SELECT SQL_CACHE.