Review 228 1Z0-908 practice questions with answer explanations and community insights.
Question 1
Examine this statement, which executes successfully: You want to improve the performance of this query: Which change enables the query to succeed while accessing fewer rows?
ALTER TABLE world.city ADD SPATIAL INDEX (Name);
ALTER TABLE world.city ADD SPATIAL INDEX (Population);
ALTER TABLE world.city ADD INDEX (Population);
ALTER TABLE world.city ADD INDEX (Name);
ALTER TABLE world.city ADD FULLTEXT INDEX (Name);
ALTER TABLE world.city ADD FULLTEXT INDEX (Population);
Question 2
Which three are characteristics of a newly created role? (Choose three.)
It can be dropped using the DROP ROLE statement.
It is stored in the mysql.role table.
It is created as a locked account.
It can be renamed using the RENAME ROLE statement.
It can be granted to user accounts.
It can be protected with a password.
Question 3
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: 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?
RESET MASTER; SET GLOBAL gtid_purged=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-10167;
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;
RESET SLAVE; SET GLOBAL gtid_purged=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-3820; SET GLOBAL gtid_executed=aaaaaaaa-aaaa-aaaa-aaaa—aaaaaaaaaaaa:1-10300;
RESET MASTER; SET GLOBAL gtid_purged-aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-2312; SET GLOBAL gtid_executed=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-10167;
RESET SLAVE; SET GLOBAL gtid_purged=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-10167;
Question 4
The data in this instance is transient; no backup or replication will be required. It is currently under performing. The database size is static and including indexes is 19G. Total system memory is 32G. After profiling the system, you highlight these MySQL status and global variables: The OS metrics indicate that disk is a bottleneck. Other variables retain their default values. Which three changes will provide the most benefit to the instance? (Choose three.)
innodb_flush_log_at_trx_commit=1
buffer_pool_size=24G
innodb_log_file_size=1G
sync_binlog=0
innodb_doublewrite=0
max_connections=10000
innodb_undo_directory=/dev/shm
Question 5
Which statement is true about InnoDB persistent index statistics?
Updating index statistics is an I/O expensive operation.
Index statistics are calculated from pages buffered in the buffer pool for tables with InnoDB storage engine.
Setting innodb_stats_auto_recalc=ON causes statistics to be updated automatically when a new index is created.
Execution plans based on transient index statistics improve precision when innodb_stats_persistent_sample_pages is increased.
Increasing innodb_stats_persistent_sample_pages determines higher pages scanning speed, at the cost of increased memory usage.
Tables are scanned and index statistics recalculated when an instance is restarted.