单项选择题
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?()
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
相关考题
-
多项选择题
What are three actions performed by the mysql_secure_installation tool?()
A.It prompts you to set the root user account password
B.It checks whether file permissions are appropriate within datadir
C.It asks to remove the test database, which is generated at installation time
D.It can delete any anonymous accounts
E.It verifies that all users are configuration with the longer password hash -
多项选择题
In a design situation, there are multiple character sets that can properly encode your data. Which three should influence your choice of character set?()
A.Syntax when writing queries involving JOINS
B.Memory usage when working with the data
C.Character set mapping index hash size
D.Disk usage when storing data -
单项选择题
You install a copy of Mysql 5.6.13 on a brand new Linux server by using RPM packages. The server starts successfully as verified by the following commands: $ pidof mysqld 3132 $tail – n2 /var/lib.mysql/hostname.err 2013-08-18 08:18:38 3132 [Note] /usr/sbin/mysqld:ready for connections. Version: 5.6.13-enterprise-commercial-advaced socket:/tmp/mysql.sock port; 3306 Mysql Enterprise Server – Advanced Edition (Commercial) You attempt to log in as the root user with the following command: $mysql – u root ERROR 1045 (28000): Access denied for user root@localhost (using password: NO) Which statement is true about this scenario?()
A.The RPM installation script sets a default password of password for new installations
B.The local root user must log in with a blank password initially: mysql –u root –p
C.New security measures mean that the mysql_secure_installation script must be run first on all new installations
D.The mysql_install_bd post-installation script used – random-password
