nerdexam
Oracle

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

1Z0-882 question #28 exhibit 1
1Z0-882 question #28 exhibit 2

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)
  • A
    4% (2)
  • B
    10% (5)
  • C
    2% (1)
  • D
    85% (44)

Community Discussion

No community discussion yet for this question.

Full 1Z0-882 Practice