How can this query be optimized?

Inspect the query:
Mysql> SELECT count (emp_no) FROM titles WHERE title = ‘senior staff’;


How can this query be optimized?

Inspect the query:
Mysql> SELECT count (emp_no) FROM titles WHERE title = ‘senior staff’;


How can this query be optimized?

A.
The query need an index on the emp-no column.

B.
The query cannot be optimized as an index is already used.

C.
The query needs an index that includes the title column.

D.
The query cannot be optimized as count () must read all rows.



Leave a Reply 7

Your email address will not be published. Required fields are marked *


420

420

sorry i’m not 51% sure i’m 61% sure that the correct answer is C.

j

j

TESTED! D 100%