explain.depesz.com

PostgreSQL's explain analyze made readable

Result: J8Cy

Settings
# exclusive inclusive rows x rows loops node
1. 165.360 470.048 ↓ 19.5 138,913 1

Finalize HashAggregate (cost=17,656.57..17,834.72 rows=7,126 width=240) (actual time=403.982..470.048 rows=138,913 loops=1)

  • Group Key: r.away_team, (CASE WHEN ((rt.display_name)::text <> 'Purchase'::text) THEN d.name ELSE NULL::character varying END), creatorname.employee_name, rs.display_name, r.home_team, e.event_date, e.event_unique_id, st.name, r.request_number, r.ticket_count, requestername.employee_name, (CASE WHEN ((rt.display_name)::text <> 'Purchase'::text) THEN r.gl_code ELSE NULL::character varying END)
2. 20.441 304.688 ↓ 23.4 138,913 1

Gather (cost=16,810.41..17,448.74 rows=5,938 width=232) (actual time=270.600..304.688 rows=138,913 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 59.145 284.247 ↓ 15.6 46,304 3 / 3

Partial HashAggregate (cost=15,810.41..15,854.94 rows=2,969 width=232) (actual time=265.576..284.247 rows=46,304 loops=3)

  • Group Key: r.away_team, CASE WHEN ((rt.display_name)::text <> 'Purchase'::text) THEN d.name ELSE NULL::character varying END, creatorname.employee_name, rs.display_name, r.home_team, e.event_date, e.event_unique_id, st.name, r.request_number, r.ticket_count, requestername.employee_name, CASE WHEN ((rt.display_name)::text <> 'Purchase'::text) THEN r.gl_code ELSE NULL::character varying END
4. 9.747 225.102 ↓ 15.8 46,767 3 / 3

Parallel Hash Left Join (cost=6,154.53..15,713.91 rows=2,969 width=232) (actual time=24.645..225.102 rows=46,767 loops=3)

  • Hash Cond: (rtm.ticket_id = ti.id)
5. 10.239 193.381 ↓ 15.8 46,767 3 / 3

Hash Left Join (cost=272.58..9,809.32 rows=2,969 width=438) (actual time=2.234..193.381 rows=46,767 loops=3)

  • Hash Cond: (r.id = rtm.request_id)
6. 11.359 182.588 ↓ 15.6 46,304 3 / 3

Hash Left Join (cost=178.54..9,603.58 rows=2,969 width=438) (actual time=1.670..182.588 rows=46,304 loops=3)

  • Hash Cond: (r.account_id = uam.account_id)
7. 10.743 170.957 ↓ 15.6 46,304 3 / 3

Hash Join (cost=150.95..9,535.27 rows=2,969 width=433) (actual time=1.388..170.957 rows=46,304 loops=3)

  • Hash Cond: (r.request_status = rs.id)
8. 9.029 160.168 ↓ 12.8 46,304 3 / 3

Nested Loop (cost=145.81..9,520.24 rows=3,618 width=435) (actual time=1.329..160.168 rows=46,304 loops=3)

9. 9.104 58.530 ↓ 12.8 46,304 3 / 3

Hash Join (cost=145.39..7,538.36 rows=3,618 width=451) (actual time=1.308..58.530 rows=46,304 loops=3)

  • Hash Cond: (r.requester = requestername.id)
10. 9.939 49.149 ↓ 12.8 46,304 3 / 3

Hash Join (cost=108.53..7,491.96 rows=3,618 width=453) (actual time=1.019..49.149 rows=46,304 loops=3)

  • Hash Cond: (r.creator = creatorname.id)
11. 9.895 38.969 ↓ 12.8 46,304 3 / 3

Hash Join (cost=71.68..7,445.57 rows=3,618 width=455) (actual time=0.768..38.969 rows=46,304 loops=3)

  • Hash Cond: (r.request_type = rt.id)
12. 13.526 29.063 ↓ 6.4 46,304 3 / 3

Hash Join (cost=70.58..7,412.06 rows=7,235 width=253) (actual time=0.746..29.063 rows=46,304 loops=3)

  • Hash Cond: (r.event_id = e.id)
13. 14.815 14.815 ↑ 1.3 46,304 3 / 3

Parallel Seq Scan on request r (cost=0.00..7,051.81 rows=57,881 width=206) (actual time=0.014..14.815 rows=46,304 loops=3)

  • Filter: (is_active AND is_active)
  • Rows Removed by Filter: 0
14. 0.221 0.722 ↓ 7.5 1,296 3 / 3

Hash (cost=68.43..68.43 rows=172 width=79) (actual time=0.722..0.722 rows=1,296 loops=3)

  • Buckets: 2,048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 135kB
15. 0.343 0.501 ↓ 7.5 1,296 3 / 3

Hash Join (cost=2.15..68.43 rows=172 width=79) (actual time=0.047..0.501 rows=1,296 loops=3)

  • Hash Cond: (e.season_id = s.id)
16. 0.127 0.127 ↑ 1.0 1,371 3 / 3

Seq Scan on event e (cost=0.00..57.71 rows=1,371 width=63) (actual time=0.006..0.127 rows=1,371 loops=3)

17. 0.004 0.031 ↑ 1.0 1 3 / 3

Hash (cost=2.14..2.14 rows=1 width=48) (actual time=0.030..0.031 rows=1 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
18. 0.004 0.027 ↑ 1.0 1 3 / 3

Nested Loop (cost=0.00..2.14 rows=1 width=48) (actual time=0.026..0.027 rows=1 loops=3)

  • Join Filter: (s.type = st.id)
  • Rows Removed by Join Filter: 2
19. 0.014 0.014 ↑ 1.0 1 3 / 3

Seq Scan on season s (cost=0.00..1.07 rows=1 width=32) (actual time=0.014..0.014 rows=1 loops=3)

  • Filter: (is_active AND (((type)::character varying)::text = 'e9d61527-def7-46be-9167-bb1644185768'::text))
  • Rows Removed by Filter: 3
20. 0.009 0.009 ↓ 1.5 3 3 / 3

Seq Scan on season_type st (cost=0.00..1.04 rows=2 width=48) (actual time=0.009..0.009 rows=3 loops=3)

  • Filter: is_active
  • Rows Removed by Filter: 1
21. 0.003 0.011 ↓ 2.0 6 3 / 3

Hash (cost=1.06..1.06 rows=3 width=234) (actual time=0.011..0.011 rows=6 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
22. 0.008 0.008 ↓ 2.0 6 3 / 3

Seq Scan on request_type rt (cost=0.00..1.06 rows=3 width=234) (actual time=0.007..0.008 rows=6 loops=3)

  • Filter: is_active
23. 0.120 0.241 ↑ 1.0 838 3 / 3

Hash (cost=26.38..26.38 rows=838 width=30) (actual time=0.241..0.241 rows=838 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 59kB
24. 0.121 0.121 ↑ 1.0 838 3 / 3

Seq Scan on user_info creatorname (cost=0.00..26.38 rows=838 width=30) (actual time=0.002..0.121 rows=838 loops=3)

  • Filter: is_active
25. 0.119 0.277 ↑ 1.0 838 3 / 3

Hash (cost=26.38..26.38 rows=838 width=30) (actual time=0.277..0.277 rows=838 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 59kB
26. 0.158 0.158 ↑ 1.0 838 3 / 3

Seq Scan on user_info requestername (cost=0.00..26.38 rows=838 width=30) (actual time=0.008..0.158 rows=838 loops=3)

  • Filter: is_active
27. 92.609 92.609 ↑ 1.0 1 138,913 / 3

Index Scan using pk_request_details on request_details rd (cost=0.42..0.55 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=138,913)

  • Index Cond: (id = r.request_details_id)
  • Filter: is_active
28. 0.014 0.046 ↑ 1.0 87 3 / 3

Hash (cost=4.06..4.06 rows=87 width=30) (actual time=0.046..0.046 rows=87 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 14kB
29. 0.032 0.032 ↑ 1.0 87 3 / 3

Seq Scan on request_status rs (cost=0.00..4.06 rows=87 width=30) (actual time=0.015..0.032 rows=87 loops=3)

  • Filter: (is_active IS TRUE)
  • Rows Removed by Filter: 19
30. 0.053 0.272 ↑ 1.0 375 3 / 3

Hash (cost=22.90..22.90 rows=375 width=37) (actual time=0.272..0.272 rows=375 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 35kB
31. 0.064 0.219 ↑ 1.0 375 3 / 3

Hash Left Join (cost=13.15..22.90 rows=375 width=37) (actual time=0.124..0.219 rows=375 loops=3)

  • Hash Cond: (uam.department_id = d.id)
32. 0.049 0.049 ↑ 1.0 375 3 / 3

Seq Scan on department_account_map uam (cost=0.00..8.76 rows=375 width=32) (actual time=0.008..0.049 rows=375 loops=3)

  • Filter: is_active
  • Rows Removed by Filter: 1
33. 0.051 0.106 ↑ 1.0 362 3 / 3

Hash (cost=8.62..8.62 rows=362 width=37) (actual time=0.106..0.106 rows=362 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 33kB
34. 0.055 0.055 ↑ 1.0 362 3 / 3

Seq Scan on department d (cost=0.00..8.62 rows=362 width=37) (actual time=0.007..0.055 rows=362 loops=3)

  • Filter: is_active
35. 0.223 0.554 ↓ 1.0 1,761 3 / 3

Hash (cost=72.11..72.11 rows=1,754 width=32) (actual time=0.554..0.554 rows=1,761 loops=3)

  • Buckets: 2,048 Batches: 1 Memory Usage: 127kB
36. 0.331 0.331 ↓ 1.0 1,761 3 / 3

Seq Scan on request_ticket_map rtm (cost=0.00..72.11 rows=1,754 width=32) (actual time=0.006..0.331 rows=1,761 loops=3)

  • Filter: is_active
  • Rows Removed by Filter: 548
37. 9.383 21.974 ↑ 1.2 43,482 3 / 3

Parallel Hash (cost=5,202.60..5,202.60 rows=54,348 width=24) (actual time=21.974..21.974 rows=43,482 loops=3)

  • Buckets: 131,072 Batches: 1 Memory Usage: 8,224kB
38. 12.591 12.591 ↑ 1.2 43,482 3 / 3

Parallel Seq Scan on ticket ti (cost=0.00..5,202.60 rows=54,348 width=24) (actual time=0.021..12.591 rows=43,482 loops=3)

  • Filter: is_active
  • Rows Removed by Filter: 6