移动端

  • 题王微信公众号

    题王微信公众号

    微信搜“题王网”真题密题、最新资讯、考试攻略、轻松拿下考试

单选题

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?()

发布日期:2022-07-06

Consider the query: Mysql> SET @run = 15; Mysql> E...
A

Do not pass a user variable in the WHERE clause because it limits the ability of the optimizer to use indexes

B

Add an index on the objective column so that is can be used in both the WHERE and GROUP BY operations

C

Drop the run_2 index because it has caused a conflict in the choice of key for this query

D

Execute the run_2 index because it has caused a conflict in the choice of key for this query

E

Add a composite index on (run,objective,stage) to allow the query to fully utilize an index

标签: "暂无标签"

题王网让考试变得更简单

扫码关注题王,更多免费功能准备上线!