单选题

Examine this statement, which executes successfully:

CREATE TABLE world.city (

ID int NOT NULL AUTO INCREMENT,

Name char(35) NOT NULL DEFAULT ",

CountryCode char(3) NOT NULL DEFAULT ",

District char(20) NOT NULL DEFAULT ",

Population int NOT NULL DEFAULT '0',

PRIMARY KEY (ID),

KEY CountryCode (CountryCode)

) ENGINE=InnoDB;

You want to improve the performance of this query:

SELECT Name

FROM world.city

WHERE Population BETWEEN 1000000 AND 2000000;

Which change enables the query to succeed while accessing fewer rows?

A、

ALTER TABLE world.city ADD SPATIAL INDEX (Name);

B、

ALTER TABLE world.city ADD SPATIAL INDEX (Population);

C、

ALTER TABLE world.city ADD INDEX (Population);

D、

ALTER TABLE world.city ADD INDEX (Name);

E、 ALTER TABLE world.city ADD FULLTEXT INDEX (Name);
F、 ALTER TABLE world.city ADD FULLTEXT INDEX (Population);
下载APP答题
由4l***7c提供 分享 举报 纠错

相关试题

单选题 You must configure the MySQL command-line client to provide the highest level of trust and security when connecting to a remote MySQL Server.
Which value of --ssl-mode will do this?

A、 PREFERRED
B、 VERIFY_CA
C、 REQUIRED
D、 VERIFY_IDENTITY

单选题 Examine these entries from the general query log:
Time Id Command Argument
2019-12-17T00:36:23.389450Z 24 Connect root@localhost on mydb using SSL/TLS
2019-12-17T00:36:23.389754Z 24 Query select @@version comment limit 1
2019-12-17T00:36:23.929519Z 25 Connect root@localhost on mydb using SSL/TLS
2019-12-17T00:36:23.929846Z 25 Query select @@version_comment limit 1
2019-12-17700:36:27.633082Z 24 Query START TRANSACTION
2019-12-17T00:36:30.321657Z 24 Query UPDATE tl SET val = 1 WHERE ID = 130
2019-12-17T00:36:32.417433Z 25 Query START TRANSACTION
2019-12-17T00:36:33.617642Z 25 Query UPDATE t2 SET val = 5 WHERE ID = 3805
2019-12-17700:36:36.0494582 25 Query UPDATE tl SET val = 10 WHERE ID = 130
2019-12-17T00:36:38.513674Z 24 Query UPDATE t2 SET val = 42 WHERE ID = 3805
All UPDATE statements reference existing rows.
Which describes the outcome of the sequence of statements?

A、 Connection 24 experiences a lock wait timeout.
B、 Connection 25 experiences a lock wait timeout.
C、 A deadlock occurs immediately.
D、 All statements execute without error.
E、 A deadlock occurs after innodb_lock_wait_timeout seconds.

单选题 You have configured GTID-based asynchronous replication with one master and one slave.
A user accidentally updated some data on the slave.
To fix this, you stopped replication and successfully reverted the accidental changes. Examine the current GTID information:
Master uuid: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
Master gtids_executed: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-10300
Master gtids_purged: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-3820
Slave uuid: bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb
Slave gtids executed: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-10167,
bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb:1-9
Slave gtidsyurged: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-2312
You must fix GTID sets on the slave to avoid replicating unwanted transactions in case of failover. Which set of actions would allow the slave to continue replicating without erroneous transactions?

A、 RESET MASTER;
SET GLOBAL gtid_purged=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-10167;
B、SET GLOBAL gtid_purged=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-2312,bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb:1-9;
SET GLOBAL gtid_executed=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-10167;
C、 RESET SLAVE;
SET GLOBAL gtid_purged=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-3820;
SET GLOBAL gtid_executed=aaaaaaaa-aaaa-aaaa-aaaa—aaaaaaaaaaaa:1-10300;
D、 RESET MASTER;
SET GLOBAL gtid_purged-aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-2312;
SET GLOBAL gtid_executed=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-10167;
E、 RESET SLAVE;
SET GLOBAL gtid_purged=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-10167;

单选题 Consider this shell output and executed commands:
[root@oel7 ~]# ps aux | grep mysqld
Mysql 2076 3.5 24.6 1386852 372572 ? Ssl 12:01 0:01 /usr/sbin/mysqid [root@oel7 ~]# kill -15 2076
Which statement is true about MySQL server shutdown?

A、 kill -15 should be avoided. Use other methods such as mysqladmin shutdown or systemctl stop mysqld.
B、 kill -15 and kill -9 are effectively the same forced shutdown that risk committed transactions not written to disk.
C、 kill -15 carries out a normal shutdown process, such as mysqladmin shutdown.
D、 mysqld_safe prohibits commands that would harm the operation of the server. An error would be returned by the kill command.

单选题 Examine this command, which executes successfully:
$ mysqlrouter --bootstrap user@hostname:port --directory=directory_path
Which activity is performed?

A、 MySQL Router is configured based on the information in files in directory_path.
B、 MySQL Router configures itself based on the information retrieved from the InnoDB cluster metadata server.
C、 MySQL Router is restarted.
D、 MySQL Router configures all the cluster nodes based on the information retrieved from the InnoDB cluster metadata server.

单选题 You wish to protect your MySQL database against SQL injection attacks.
Which method would fail to do this?

A、 installing and configuring the Connection Control plugin
B、 avoiding concatenation of SQL statements and user-supplied values in an application
C、 using stored procedures for any database access
D、 using PREPARED STATEMENTS

单选题 Which statement is true about InnoDB persistent index statistics?

A、 Updating index statistics is an I/O expensive operation.
B、 Index statistics are calculated from pages buffered in the buffer pool for tables with InnoDB storage engine.
C、 Setting innodb_stats_auto_recalc=ON causes statistics to be updated automatically when a new index is created.
D、 Execution plans based on transient index statistics improve precision when innodb_stats_persistent_sample_pages is increased.
E、 Increasing innodb_stats_persistent_sample_pages determines higher pages scanning speed, at the cost of increased memory usage.
F、 Tables are scanned and index statistics recalculated when an instance is restarted.

单选题 You have just installed MySQL on Oracle Linux and adjusted your /etc/my.cnf parameters to suit your installation.
Examine the output:
# systemctl start mysqld
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.
# systemctl status mysqld.service
mysqld.service - MySQL Server
Loaded: loaded (/usx/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2019-12-12 07:54:53 ACDT; 33s ago
Docs: man:mysqld(8)
Http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 2732 ExecStart=/usasbin/mysqld $MYSQLD_OPTS (code=exited, status=1/FAILURE)
Process: 2705 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 2732 (code=exited, status=1/FAILURE)
Status: "Server startup in progress"
Dec 12 07:54:49 oel7 systemd[1]: Starting MySQL Server...
Dec 12 07:54:53 oel7 systemd[1]: mysqld.service: main process exited, code=exited, status=1/FAILURE
Dec 12 07:54:53 oel7 systemd[1]: Failed to start MySQL Server.
Dec 12 07:54:53 oel7 systemd[1]: Unit mysqld.service entered failed state.
Dec 12 07:54:53 oel7 systemd[1]: mysqld.service failed.
What statement is true about the start attempt?

A、 MySQL server was not started due to a problem while executing process 2732.
B、 MySQL server continued to start up even though another process existed.
C、 systemd found the mysqld service disabled and failed to start it.
D、 systemd waited for 30 seconds before timing out and start up failed.
E、 systemd attempted to start mysqld, found another systemd mysqld process running, and shut it down.