explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 15ta

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.123 ↓ 0.0 0 1

Limit (cost=14.70..14.71 rows=1 width=24) (actual time=0.122..0.123 rows=0 loops=1)

2. 0.008 0.122 ↓ 0.0 0 1

Sort (cost=14.70..14.71 rows=1 width=24) (actual time=0.121..0.122 rows=0 loops=1)

  • Sort Key: tblapplication.crbportablebasicexpirydate
  • Sort Method: quicksort Memory: 25kB
3. 0.004 0.114 ↓ 0.0 0 1

Nested Loop (cost=0.86..14.69 rows=1 width=24) (actual time=0.114..0.114 rows=0 loops=1)

4. 0.004 0.041 ↓ 1.5 3 1

Nested Loop (cost=0.57..13.37 rows=2 width=8) (actual time=0.027..0.041 rows=3 loops=1)

5. 0.022 0.022 ↓ 1.5 3 1

Index Scan using ticket_state_idx on ticket (cost=0.29..8.72 rows=2 width=8) (actual time=0.017..0.022 rows=3 loops=1)

  • Index Cond: (state = 'CheckPortableDBS'::ticketstates)
  • Filter: (tickettype = 'Convictions'::tickettypes)
6. 0.015 0.015 ↑ 1.0 1 3

Index Scan using groups_pkey on groups (cost=0.29..2.33 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=3)

  • Index Cond: (groupid = ticket.groupid)
  • Filter: ((keytable)::text = 'tblapplication'::text)
7. 0.069 0.069 ↓ 0.0 0 3

Index Scan using tblapplication_pkey on tblapplication (cost=0.29..0.53 rows=1 width=20) (actual time=0.023..0.023 rows=0 loops=3)

  • Index Cond: (applicationid = groups.foreignkey)
  • Filter: ((crbportablebasicexpirydate IS NOT NULL) AND (stage >= 'Interview'::nn_stage) AND (crbportablebasicexpirydate > now()) AND CASE stage WHEN 'Authorisation'::nn_stage THEN false WHEN 'Longlisting'::nn_stage THEN (state = ANY ('{Received,Sponsorship,Sorted}'::nn_state[])) WHEN 'Shortlisting'::nn_stage THEN (state = ANY ('{Shortlist,Evaluate}'::nn_state[])) WHEN 'Interview'::nn_stage THEN (state = ANY ('{Schedule,Interview,Exempt,NextRoundSchedule,NextRoundExempt}'::nn_state[])) WHEN 'Offer'::nn_stage THEN (state = ANY ('{Pending,Conditional,ChecksOK,WorkTrial,ReadyForStartDate}'::nn_state[])) WHEN 'Starting'::nn_stage THEN (state = ANY ('{StartDateBooked,UpdateStaffRecord,ChecksOutstanding,ChecksComplete}'::nn_state[])) WHEN 'Outcome'::nn_stage THEN (state = 'Recruited'::nn_state) ELSE NULL::boolean END)
  • Rows Removed by Filter: 1
Planning time : 2.089 ms
Execution time : 0.188 ms