网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

Consider the query:Mysql> SET @run = 15;Mysql> EXPLAIN SELECT objective, stage, COUNT (stage)FROM iteminformationWHERE run=@run AND objective=’7.1’GROUP BY objective,stageORDER 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?()

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:Mysql> SET @run = 15;Mysql> EXPLAIN SELECT objective, stage, COUNT (stage)FROM iteminformationWHERE run=@run AND objective=’7.1’GROUP BY objective,stageORDER 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?()A.Do not pass a user variable in the WHERE clause because it limits the ability of the optimizer to use indexesB.Add an index on the objective column so that is can be used in both the WHERE and GROUP BY operationsC.Drop the run_2 index because it has caused a conflict in the choice of key for this queryD.Execute the run_2 index because it has caused a conflict in the choice of key for this queryE.Add a composite index on (run,objective,stage) to allow the query to fully utilize an index ” 相关考题
考题 mysql_query在功能上等于mysql_select_db()+mysql_db_query()。() 此题为判断题(对,错)。

考题 mysql_db_query与mysql_query在执行sql语句后的返回值是一样的,成功返回资源号,失败返回FALSE。() 此题为判断题(对,错)。

考题 PHP使用以下哪个函数连接MySQL数据库服务器() A.mysql_queryB.mysql_select_dbC.mysql_connectD.mysql_fetch_array

考题 php连接上mysql之后,采用哪个函数配置循环可以得到指定表中的记录?() A.mysql_fetch_rowB.mysql_select_dbC.mysql_queryD.mysql_connect

考题 php哪个函数用于向mysql数据库发送指令?() A.mysql_select_dbB.mysql_connectC.mysql_queryD.mysql_fetch_field

考题 1、设置MySQL字符集的方法A.修改my.ini配置文件,可修改MySQL默认的字符集。###SXB###B.MySQL提供MySQL命令可以“临时地”修改MySQL“当前会话的”字符集以及字符序。###SXB###C.使用MySQL命令 “set names gbk;”可以“临时一次性地”设置character_set_client、character_set_connection以及character_set_results的字符集为gbk###SXB###D.连接MySQL服务器时指定字符集 mysql --default-character-set=字符集 -h 服务器IP地址 -u 账户名 –p密码

考题 在MySQL中,除了可以使用SET语句为变量赋值外,还可以通过SELECT…INTO为一个或多个变量赋值。

考题 PHP中,选定某个数据库的函数名是____。A.mysql_connect_dbB.mysql_select_dbC.mysql_query_dbD.mysql_pconnect_db

考题 连接mysql数据库服务器的函数是什么?A.mysqli_connect()B.mysqli_query()C.mysqli_error()D.mysqli_select_db()