搜题
用户您好, 请在下方输入框内搜索其它题目:
搜题
题目内容 (请给出正确答案)
提问人:网友 发布时间:
【单选题】

Consider the query:<br /> Mysql> SET @run = 15;<br /> Mysql> EXPLAIN SELECT objective, stage, COUNT (stage)<br /> FROM iteminformation<br /> WHERE run=@run AND objective=&rsquo;7.1&rsquo;<br /> GROUP BY objective,stage<br /> ORDER BY stage;<br /> <img src="https://nimg.ppkao.com/2018-08/tangxueping/2018080116105872201.jpg?sign=935d2e87bc06929dcaea9339b8f73ca2&t=62d08896" /><br /> The iteminformation table has the following indexes;<br /> Mysql> SHOW INDEXES FROM iteminformation:<br /> <img src="https://nimg.ppkao.com/2018-08/tangxueping/2018080116111090166.jpg?sign=01dd2c6977a21dac6046aade71a4d6c6&t=62d08896" /><br /> This query is run several times in an application with different values in the WHERE clause in a growing data set.<br /> What is the primary improvement that can be made for this scenario?()

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

更多“ Consider the query:<br /> Mysql> SET @run = 15;<br /> Mysql> EXPLAIN SELECT objective, stage, COUNT (stage)<br /> FROM iteminformation<br /> WHERE run=@run AND objective=&rsquo;7.1&rsquo;<br /> GROUP BY objective,stage<br /> ORDER BY stage;<br /> <img src="https://nimg.ppkao.com/2018-08/tangxueping/2018080116105872201.jpg?sign=935d2e87bc06929dcaea9339b8f73ca2&t=62d08896" /><br /> The iteminformation table has the following indexes;<br /> Mysql> SHOW INDEXES FROM iteminformation:<br /> <img src="https://nimg.ppkao.com/2018-08/tangxueping/2018080116111090166.jpg?sign=01dd2c6977a21dac6046aade71a4d6c6&t=62d08896" /><br /> This query is run several times in an application with different values in the WHERE clause in a growing data set.<br /> What is the primary improvement that can be made for this scenario?()”相关的问题
第1题

A、The inner query always sorts the results of the outer query.  B、The outer query always sorts the results of the inner query.  C、The outer query must return a value to the inner query.  D、The inner query returns a value to the outer query.  E、The inner query must always return a value or the outer query will give an error.  

点击查看答案
第2题

A、The inner query always sorts the results of the outer query  B、The outer query always sorts the results of the inner query  C、The outer query must return a value to the outer query  D、The inner query returns a value to the outer query  E、The inner query must always return a value or the outer query will give an error  

点击查看答案
第3题

A、A. The inner query always sorts the results of the outer query  B、B. The outer query always sorts the results of the inner query  C、C. The outer query must return a value to the outer query  D、D. The inner query returns a value to the outer query  E、E. The inner query must always return a value or the outer query will give an error  

点击查看答案
第4题

A、The General Query Log records more data than the Binary Log  B、The binary Log records more data than the General Query Log  C、The Slow Query Log records more data than the General Query Log  D、The General Query Log records more data than the Slow Query Log  E、The Slow Query Log records more data than the Binary Log  F、The Binary Log records more data than the Slow Query Log  

点击查看答案
第6题

A、The main query executes with the first value returned by the subquery.  B、The main query executes with the last value returned by the subquery.  C、The main query executes with all the values returned by the subquery.  D、The main query fails because the multiple-row subquery cannot be used with the comparison operator.  E、You cannot define a multiple-row subquery in the WHERE clause of a SQL query.  

点击查看答案
第7题

A、The main query executes with the first value returned by the subquery.  B、The main query executes with the last value returned by the subquery.  C、The main query executes with all the values returned by the subquery.  D、The main query fails because the multiple-row subquery cannot be used with the comparison operator.  E、You cannot define a multiple-row subquery in the WHERE clause of a SQL query.  

点击查看答案
第8题

A、The main query executes with the first value returned by the subquery.  B、The main query executes with the last value returned by the subquery.  C、The main query executes with all the values returned by the subquery.  D、The main query fails because the multiple-row subquery cannot be used with the comparison operator.  E、You cannot define a multiple-row subquery in the WHERE clause of a SQL query.  

点击查看答案
第9题

A、Exhibit A  B、Exhibit B  C、The query returns no rows  D、The query fails because the outer query is retrieving more than one column  E、The query fails because both the inner and outer queries are retrieving data from the same table.  

点击查看答案
客服
TOP

请使用微信扫码支付

订单号:
遇到问题请联系在线客服