explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PLQC

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 99.915 ↓ 0.0 0 1

Limit (cost=3,803.43..3,803.44 rows=1 width=24) (actual time=99.915..99.915 rows=0 loops=1)

2. 0.050 99.913 ↓ 0.0 0 1

Sort (cost=3,803.43..3,803.44 rows=1 width=24) (actual time=99.913..99.913 rows=0 loops=1)

  • Sort Key: tblapplication.crbportabledate
  • Sort Method: quicksort Memory: 25kB
3. 0.330 99.863 ↓ 0.0 0 1

Nested Loop (cost=1.42..3,803.42 rows=1 width=24) (actual time=99.863..99.863 rows=0 loops=1)

4. 0.497 54.317 ↓ 4.4 1,256 1

Nested Loop (cost=0.99..3,473.52 rows=283 width=8) (actual time=0.122..54.317 rows=1,256 loops=1)

5. 32.468 32.468 ↓ 4.4 1,256 1

Index Scan using ticket_state_idx on ticket (cost=0.56..2,785.32 rows=283 width=8) (actual time=0.075..32.468 rows=1,256 loops=1)

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

Index Scan using groups_pkey on groups (cost=0.43..2.43 rows=1 width=8) (actual time=0.017..0.017 rows=1 loops=1,256)

  • Index Cond: (groupid = ticket.groupid)
  • Filter: ((keytable)::text = 'tblapplication'::text)
7. 45.216 45.216 ↓ 0.0 0 1,256

Index Scan using tblapplication_pkey on tblapplication (cost=0.43..1.16 rows=1 width=20) (actual time=0.036..0.036 rows=0 loops=1,256)

  • Index Cond: (applicationid = groups.foreignkey)
  • Filter: ((crbportabledate IS NOT NULL) AND (stage >= 'Interview'::nn_stage) AND (crbportabledate > 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 : 13.032 ms
Execution time : 100.056 ms