1Z0-882 · Question #28
You execute this EXPLAIN statement for a SELECT statement on the table named comics.which contains 1183 rows: Mysql> explain select comic_ title, publisher from comics where comic_title like &…
The correct answer is D. Because a wildcard character is at the beginning of the search word. See the full explanation below for the reasoning.
Question
You execute this EXPLAIN statement for a SELECT statement on the table named comics.which contains 1183 rows:
Mysql> explain select comic_ title, publisher from comics where comic_title like `& Action&'; row in set (0.00 sec) You create the following index:
CREATE INDEX cimic_title_idx ON comics (comic_title, publisher); You run the same EXPLAIN statement again; Mysql > explain select comic_title ,publisher from comics where comic_title like `& Action&'; 1 row inset (0.00 sec) Why didthe second SELECT statement need to read all 1183 rows in the index comic_title_idx?
Exhibits
Options
- ABecause comic_title is not the primary key
- BBecause a LIKE statement always requires a full tables scan
- CBecause comic _title is part of acovering index
- DBecause a wildcard character is at the beginning of the search word
How the community answered
(52 responses)- A4% (2)
- B10% (5)
- C2% (1)
- D85% (44)
Community Discussion
No community discussion yet for this question.

