可学答题网 > 问答 > 1z0-883题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

Consider the query: Mysql> SET @run =


Consider the query: Mysql> SET @run = 15; Mysql> EXPLAIN SELECT objective, stage, COUNT (stage) FROM iteminformation WHERE run=@run AND objective=’7.1’ GROUP BY objective,stage ORDER BY stage; The iteminformation table has the following indexes; Mysql> SHOW INDEXES FROM iteminformation: This query is run several times in an application with different values in the WHERE clause in a growing data set. What is the primary improvement that can be made for this scenario?()

  • ADo not pass a user variable in the WHERE clause because it limits the ability of the optimizer to use indexes
  • BAdd an index on the objective column so that is can be used in both the WHERE and GROUP BY operations
  • CDrop the run_2 index because it has caused a conflict in the choice of key for this query
  • DExecute the run_2 index because it has caused a conflict in the choice of key for this query
  • EAdd a composite index on (run,objective,stage) to allow the query to fully utilize an index
参考答案
参考解析:
分类:1z0-883题库
相关推荐

1、Consider the MySQL Enterprise Audit p

Consider the MySQL Enterprise Audit plugin.On attempting to start the MySQL service after a crash, notice the following error: [ERROR] Plugin &l...

2、关于mysql_db_query与mysql_query说法正确的是:()

关于mysql_db_query与mysql_query说法正确的是:()Amysql_db_query与mysql_query在执行sql语句后的返回值是一样的,成功返回资源号,失败返回FALSEB不能用mysql_query函数临时...

3、Examine the following query output: Y

Examine the following query output:You issue the following command to import tables into the hr schema:$ > impdp hr/hr directory = dumpdir dump...

4、You query the ORDERS

You query the ORDERS table and discover that order number 1101 is missing. One of...

5、Consider the followingQ

Consider the following command to create a tablespace in your production database (which&#81...

6、Consider the MySQL Enterprise Audit p

Consider the MySQL Enterprise Audit plugin, You add the following lines to the my.cnf configuration tile: [mysqld] Plugin-load=audit_log.so Audit-l...