explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PV9T

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

Limit (cost=28.20..28.21 rows=1 width=24) (actual time=2.766..2.766 rows=0 loops=1)

2. 0.009 2.765 ↓ 0.0 0 1

Sort (cost=28.20..28.21 rows=1 width=24) (actual time=2.765..2.765 rows=0 loops=1)

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

Nested Loop (cost=13.93..28.19 rows=1 width=24) (actual time=2.756..2.756 rows=0 loops=1)

4. 0.015 2.756 ↓ 0.0 0 1

Hash Join (cost=13.65..27.41 rows=1 width=12) (actual time=2.756..2.756 rows=0 loops=1)

  • Hash Cond: (applications_where_adminuser_has_role.applications_where_adminuser_has_role = groups.foreignkey)
5. 2.692 2.692 ↑ 45.5 22 1

Function Scan on applications_where_adminuser_has_role (cost=0.25..10.25 rows=1,000 width=4) (actual time=2.689..2.692 rows=22 loops=1)

6. 0.004 0.049 ↓ 1.5 3 1

Hash (cost=13.37..13.37 rows=2 width=8) (actual time=0.049..0.049 rows=3 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
7. 0.006 0.045 ↓ 1.5 3 1

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

8. 0.021 0.021 ↓ 1.5 3 1

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

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

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

  • Index Cond: (groupid = ticket.groupid)
  • Filter: ((keytable)::text = 'tblapplication'::text)
10. 0.000 0.000 ↓ 0.0 0

Index Scan using tblapplication_pkey on tblapplication (cost=0.29..0.53 rows=1 width=20) (never executed)

  • 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)
Planning time : 3.800 ms
Execution time : 2.900 ms