Code24Lab

You are not signed in — the lab works, but your progress is not saved. Sign up

Lesson 1 of 21 is free. Unlock all 21 hands-on labs, the final exam and your certificate.

Buy course — $29.90
Read first

The code

SELECT /*+ gather_plan_statistics */ *
FROM   shipments
WHERE  status = :st
AND    region = :rg;

SELECT *
FROM   TABLE(DBMS_XPLAN.DISPLAY_CURSOR(
         format => 'ALLSTATS LAST'));

-- Id | Operation          | E-Rows | A-Rows
--  0 | SELECT STATEMENT   |        |
--  1 |  TABLE ACCESS FULL |   ???  |  9750
Always read E-Rows and A-Rows side by side. If a line is off by a factor of 10 or more, fix that estimate before touching hints or indexes.
Loading the lab…