nerdexam
Oracle

1Z0-117 · Question #59

Examine the Exhibit1 to view the structure of an indexes for the EMPLOYEES table. Examine the query: SQL> SELECT * FROM employees WHERE employees_id IN (7876, 7900, 7902); EMPLOYEE_ID is a primary…

The correct answer is B. The query uses the INLIST ITERATOR operator to iterate over the enumerated value list, and values. How the CBO Evaluates IN-List Iterators The IN-list iterator is used when a query contains an IN clause with values. The execution plan is identical to what would result for a statement with an equality clause instead of IN except for one additional step. That extra step occurs…

Using Indexes and Materialized Views for Tuning

Question

Examine the Exhibit1 to view the structure of an indexes for the EMPLOYEES table. Examine the query:

SQL> SELECT * FROM employees WHERE employees_id IN (7876, 7900, 7902); EMPLOYEE_ID is a primary key in the EMPLOYEES table that has 50000 rows. Which statement is true regarding the execution of the query?

Exhibit

1Z0-117 question #59 exhibit

Options

  • AThe query uses an index skip scan on the EMP_EMP_ID_PK index to fetch the rows.
  • BThe query uses the INLIST ITERATOR operator to iterate over the enumerated value list, and values
  • CThe query uses the INLIST ITERATOR operator to iterate over the enumerated value list, and values
  • DThe query uses the INLIST ITERATOR operator to iterate over the enumerated value list, and values
  • EThe query uses a fast full index scan on the EMP_EMP_ID_PK index fetch the rows.

How the community answered

(62 responses)
  • A
    13% (8)
  • B
    77% (48)
  • C
    5% (3)
  • D
    3% (2)
  • E
    2% (1)

Explanation

How the CBO Evaluates IN-List Iterators The IN-list iterator is used when a query contains an IN clause with values. The execution plan is identical to what would result for a statement with an equality clause instead of IN except for one additional step. That extra step occurs when the IN-list iterator feeds the equality clause with unique values from the IN-list. Both of the statements in Example 2-1 and Example 2-1 are equivalent and produce the same Example 2-1 IN-List Iterators Initial Statement SELECT header_id, line_id, revenue_amount FROM so_lines_all WHERE header_id IN (1011,1012,1013); SELECT header_id, line_id, revenue_amount FROM so_lines_all WHERE header_id = 1011 OR header_id = 1012 OR header_id = 1013; ------------------------------------------------- SELECT STATEMENT TABLE ACCESS BY INDEX ROWID SO_LINES_ALL INDEX RANGE SCAN SO_LINES_N1

Topics

#INLIST ITERATOR#index range scan#primary key index#IN-list execution

Community Discussion

No community discussion yet for this question.

Full 1Z0-117 Practice