Which two statements are true about the EXPLAIN output?

Inspect the query:
Mysql>SELECT dept_no, emp_no FROM employees JOIN dept _manager USING(emp_no)
WHERE dept_no’d004’;

4 rows in set (0.00 sec)
Mysql>EXPLAIN SELECT dept_no, emp_no FROM employees JOIN dept_manager USING
(emp_no) WHERE dept_no=’d004’;

2 rows in set (0.00 sec)
Which two statements are true about the EXPLAIN output?

Inspect the query:
Mysql>SELECT dept_no, emp_no FROM employees JOIN dept _manager USING(emp_no)
WHERE dept_no’d004’;

4 rows in set (0.00 sec)
Mysql>EXPLAIN SELECT dept_no, emp_no FROM employees JOIN dept_manager USING
(emp_no) WHERE dept_no=’d004’;

2 rows in set (0.00 sec)
Which two statements are true about the EXPLAIN output?

A.
All data for the result is read from the indexex.

B.
The PRIMARY KEY is used for filtering in both tables.

C.
The minimal number of rows possible are read.

D.
The dept_manager table has 4 times as many rows than the employees table.



Leave a Reply 5

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


Ray

Ray

B is not correct, as the dept_manager does not use Primary key.
I think correct answer is A and C.