add remove language chart show hidden hide
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
1000000 rows affected
30282 rows affected
STATUS COUNT(*)
PAID 969718
UNPAID 30282
COUNT(*)
99
SQL_ID SQL_TEXT
913ycva8hpm8q select sql_id, sql_text from v$sql where sql_text like '%gather_plan_statistics%'
bytvch07gxmy2  select /*+ gather_plan_statistics */ count(*) from (select distinct client_id from invoice where status='UNPAID') where rownum<=99
PLAN_TABLE_OUTPUT
SQL_ID bytvch07gxmy2, child number 0
-------------------------------------
 select /*+ gather_plan_statistics */ count(*) from (select distinct
client_id from invoice where status='UNPAID') where rownum<=99
 
Plan hash value: 3115734079
 
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Starts | E-Rows |E-Bytes|E-Temp | Cost (%CPU)| E-Time | A-Rows | A-Time | Buffers | OMem | 1Mem | O/1/M |
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | | | | 1410 (100)| | 1 |00:00:00.03 | 3877 | | | |
| 1 | SORT AGGREGATE | | 1 | 1 | | | | | 1 |00:00:00.03 | 3877 | | | |
|* 2 | COUNT STOPKEY | | 1 | | | | | | 99 |00:00:00.03 | 3877 | | | |
| 3 | VIEW | | 1 | 22274 | | | 1410 (1)| 00:00:01 | 99 |00:00:00.03 | 3877 | | | |
|* 4 | SORT GROUP BY STOPKEY| | 1 | 22274 | 1413K| 1680K| 1410 (1)| 00:00:01 | 99 |00:00:00.03 | 3877 | 9216 | 9216 | 1/0/0|
|* 5 | TABLE ACCESS FULL | INVOICE | 1 | 22274 | 1413K| | 1063 (1)| 00:00:01 | 30282 |00:00:00.03 | 3877 | | | |
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
 
Predicate Information (identified by operation id):
---------------------------------------------------
 
   2 - filter(ROWNUM<=99)
   4 - filter(ROWNUM<=99)
   5 - filter("STATUS"='UNPAID')
 
Note
-----
   - dynamic statistics used: dynamic sampling (level=2)