MySQL Optimization


  1. The system variable to maintain InnoDB log buffer size is _________________.











  1. 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.


  1. All queries can be cached.











  1. 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.



  1. To determine whether query cache is supported by the server the variable is _________________.











  1. 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.


  1. Which mode tells not to cache query results?











  1. 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.



  1. Which mode tells cache queries that begin with SELECT SQL_CACHE?











  1. 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.