Which three statements are true about the execution of this query?
A.
The optimizer uses an index join as an access path.
B.
The optimizer uses a B* tree access path for the EMPLOYEES table.
C.
The optimizer uses a bitmap access path for the EMPLOYEES table.
D.
The optimizer performs bitmap conversion from row IDs.
E.
The optimizer performs bitmap conversion to row IDs of the combined maps.
F.
The optimizer performs bitmap conversion from the row IDs of the combined maps.
Explanation:
C: The INDEX_COMBINE hint explicitly chooses a bitmap access path for the table.
F: If you specify indexspec, then the optimizer tries to use some Boolean combination of the
specified indexes. Each parameter serves the same purpose as in “INDEX Hint”. For example:
SELECT /*+ INDEX_COMBINE(e emp_manager_ix emp_department_ix) */ *
FROM employees e
WHERE manager_id = 108
OR department_id = 110;
The answer is C,D,E
How about performing the query and looink at its execution plan?
Obviously,
C,D,E – correct.
Execution Plan
———————————————————-
Plan hash value: 3462844036
——————————————————————————————————
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
——————————————————————————————————
| 0 | SELECT STATEMENT | | 6 | 414 | 3 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID | EMPLOYEES | 6 | 414 | 3 (0)| 00:00:01 |
| 2 | BITMAP CONVERSION TO ROWIDS | | | | | |
| 3 | BITMAP OR | | | | | |
| 4 | BITMAP CONVERSION FROM ROWIDS| | | | | |
|* 5 | INDEX RANGE SCAN | EMP_MANAGER_IX | | | 1 (0)| 00:00:01 |
| 6 | BITMAP CONVERSION FROM ROWIDS| | | | | |
|* 7 | INDEX RANGE SCAN | EMP_DEPARTMENT_IX | | | 1 (0)| 00:00:01 |
——————————————————————————————————
Predicate Information (identified by operation id):
—————————————————
5 – access(“MANAGER_ID”=108)
7 – access(“DEPARTMENT_ID”=110)
Vasya !
|* 7 | INDEX RANGE SCAN | EMP_DEPARTMENT_IX | | | 1 (0)| 00:00:01 |
B.
The optimizer uses a B* tree access path for the EMPLOYEES table.
| 6 | BITMAP CONVERSION FROM ROWIDS| | | | | |
D.
The optimizer performs bitmap conversion from row IDs.
| 2 | BITMAP CONVERSION TO ROWIDS | | | | | |
E.
The optimizer performs bitmap conversion to row IDs of the combined maps.