QuestionQ196
PerformanceConsider the following statement, which executes successfully:
CREATE TABLE `t` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
KEY `b_idx` (`b`) /*!80000 INVISIBLE */,
KEY `ab_idx` (`a`,`b`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci
Which statement is true?
- A If b_idx is converted to VISIBLE, then the execution plan for SELECT * FROM t WHERE b=3; is of type eq_ref.
- B SELECT * FROM t WHERE b=3; performs a full table scan.
- C b_idx must be VISIBLE for its statistics to be updated by the ANALYZE TABLE t command.
- D ALTER TABLE t ADD INDEX ba_idx(b, a); returns an error.
- E SELECT * FROM t FORCE INDEX(b_idx) WHERE b=3; returns an error.
Community Discussion