explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wgVd

Settings
# exclusive inclusive rows x rows loops node
1. 173.377 479.563 ↓ 19.5 138,913 1

Finalize HashAggregate (cost=17,659.86..17,838.19 rows=7,133 width=240) (actual time=409.832..479.563 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. 21.797 306.186 ↓ 23.4 138,913 1

Gather (cost=16,812.84..17,451.82 rows=5,944 width=232) (actual time=269.921..306.186 rows=138,913 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 59.771 284.389 ↓ 15.6 46,304 3 / 3

Partial HashAggregate (cost=15,812.84..15,857.42 rows=2,972 width=232) (actual time=265.060..284.389 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. 10.449 224.618 ↓ 15.7 46,767 3 / 3

Parallel Hash Left Join (cost=6,154.53..15,716.25 rows=2,972 width=232) (actual time=24.522..224.618 rows=46,767 loops=3)

  • Hash Cond: (rtm.ticket_id = ti.id)
5. 10.217 192.101 ↓ 15.7 46,767 3 / 3

Hash Left Join (cost=272.58..9,811.64 rows=2,972 width=438) (actual time=2.179..192.101 rows=46,767 loops=3)

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

Hash Left Join (cost=178.54..9,605.78 rows=2,972 width=438) (actual time=1.636..181.350 rows=46,304 loops=3)

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

Hash Join (cost=150.95..9,537.43 rows=2,972 width=433) (actual time=1.357..169.902 rows=46,304 loops=3)

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

Nested Loop (cost=145.81..9,522.40 rows=3,621 width=435) (actual time=1.293..159.428 rows=46,304 loops=3)

9. 8.937 57.415 ↓ 12.8 46,304 3 / 3

Hash Join (cost=145.39..7,539.27 rows=3,621 width=451) (actual time=1.272..57.415 rows=46,304 loops=3)

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

Hash Join (cost=108.53..7,492.87 rows=3,621 width=453) (actual time=0.996..48.213 rows=46,304 loops=3)

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

Hash Join (cost=71.68..7,446.46 rows=3,621 width=455) (actual time=0.755..38.243 rows=46,304 loops=3)

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

Hash Join (cost=70.58..7,412.93 rows=7,242 width=253) (actual time=0.733..28.634 rows=46,304 loops=3)

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

Parallel Seq Scan on request r (cost=0.00..7,052.39 rows=57,939 width=206) (actual time=0.012..15.053 rows=46,304 loops=3)

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

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

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

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

  • Hash Cond: (e.season_id = s.id)
16. 0.142 0.142 ↑ 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.142 rows=1,371 loops=3)

17. 0.002 0.030 ↑ 1.0 1 3 / 3

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

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

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

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

Seq Scan on season s (cost=0.00..1.07 rows=1 width=32) (actual time=0.015..0.016 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.013 ↓ 2.0 6 3 / 3

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

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

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

  • Filter: is_active
23. 0.111 0.230 ↑ 1.0 838 3 / 3

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

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

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

  • Filter: is_active
25. 0.110 0.265 ↑ 1.0 838 3 / 3

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

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

Seq Scan on user_info requestername (cost=0.00..26.38 rows=838 width=30) (actual time=0.009..0.155 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.015 0.050 ↑ 1.0 87 3 / 3

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

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

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

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

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

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

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

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

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

  • Filter: is_active
  • Rows Removed by Filter: 1
33. 0.052 0.108 ↑ 1.0 362 3 / 3

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

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

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

  • Filter: is_active
35. 0.208 0.534 ↓ 1.0 1,761 3 / 3

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

  • Buckets: 2,048 Batches: 1 Memory Usage: 127kB
36. 0.326 0.326 ↓ 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.007..0.326 rows=1,761 loops=3)

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

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

  • Buckets: 131,072 Batches: 1 Memory Usage: 8,192kB
38. 12.673 12.673 ↑ 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.034..12.673 rows=43,482 loops=3)

  • Filter: is_active
  • Rows Removed by Filter: 6