explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VAGe

Settings
# exclusive inclusive rows x rows loops node
1. 73.591 2,035.951 ↓ 87.7 138,913 1

GroupAggregate (cost=13,943.51..14,030.63 rows=1,584 width=165) (actual time=1,609.257..2,035.951 rows=138,913 loops=1)

  • Group Key: r.home_team, r.away_team, e.event_date, a.name, a.company, u.first_name, u.last_name, rs.display_name, r.ticket_count, r.request_number
2. 947.589 1,962.360 ↓ 88.6 140,373 1

Sort (cost=13,943.51..13,947.47 rows=1,584 width=133) (actual time=1,609.239..1,962.360 rows=140,373 loops=1)

  • Sort Key: r.home_team, r.away_team, e.event_date, a.name, a.company, u.first_name, u.last_name, rs.display_name, r.ticket_count, r.request_number
  • Sort Method: external merge Disk: 21,184kB
3. 15.881 1,014.771 ↓ 88.6 140,373 1

Hash Left Join (cost=5,871.31..13,859.33 rows=1,584 width=133) (actual time=872.625..1,014.771 rows=140,373 loops=1)

  • Hash Cond: (r.id = t.request_id)
4. 22.612 998.862 ↓ 88.6 140,300 1

Hash Left Join (cost=5,866.51..13,832.74 rows=1,584 width=149) (actual time=872.594..998.862 rows=140,300 loops=1)

  • Hash Cond: (r.account_id = uam.account_id)
5. 66.332 976.165 ↓ 88.6 140,300 1

Hash Right Join (cost=5,853.07..13,797.56 rows=1,584 width=165) (actual time=872.503..976.165 rows=140,300 loops=1)

  • Hash Cond: (rtm.request_id = r.id)
6. 9.540 37.836 ↓ 1.0 1,761 1

Hash Right Join (cost=94.03..8,031.75 rows=1,754 width=24) (actual time=0.480..37.836 rows=1,761 loops=1)

  • Hash Cond: (ti.id = rtm.ticket_id)
7. 27.837 27.837 ↓ 1.0 130,447 1

Seq Scan on ticket ti (cost=0.00..5,963.65 rows=130,435 width=24) (actual time=0.013..27.837 rows=130,447 loops=1)

  • Filter: is_active
  • Rows Removed by Filter: 18
8. 0.182 0.459 ↓ 1.0 1,761 1

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

  • Buckets: 2,048 Batches: 1 Memory Usage: 127kB
9. 0.277 0.277 ↓ 1.0 1,761 1

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

  • Filter: is_active
  • Rows Removed by Filter: 548
10. 67.278 871.997 ↓ 87.7 138,913 1

Hash (cost=5,739.23..5,739.23 rows=1,584 width=157) (actual time=871.997..871.997 rows=138,913 loops=1)

  • Buckets: 32,768 (originally 2048) Batches: 8 (originally 1) Memory Usage: 3,841kB
11. 30.516 804.719 ↓ 87.7 138,913 1

Hash Join (cost=76.32..5,739.23 rows=1,584 width=157) (actual time=0.805..804.719 rows=138,913 loops=1)

  • Hash Cond: (r.request_status = rs.id)
12. 28.833 774.155 ↓ 72.0 138,913 1

Hash Join (cost=71.17..5,728.82 rows=1,930 width=159) (actual time=0.754..774.155 rows=138,913 loops=1)

  • Hash Cond: (r.requester = requestername.id)
13. 31.467 745.072 ↓ 72.0 138,913 1

Hash Join (cost=34.32..5,686.87 rows=1,930 width=191) (actual time=0.501..745.072 rows=138,913 loops=1)

  • Hash Cond: (r.requester = u.id)
14. 14.056 713.320 ↓ 72.0 138,913 1

Nested Loop (cost=3.46..5,650.93 rows=1,930 width=162) (actual time=0.212..713.320 rows=138,913 loops=1)

15. 2.393 421.438 ↓ 72.0 138,913 1

Nested Loop (cost=3.04..4,620.38 rows=1,930 width=155) (actual time=0.207..421.438 rows=138,913 loops=1)

16. 28.227 141.219 ↓ 72.0 138,913 1

Hash Join (cost=2.62..3,563.16 rows=1,930 width=155) (actual time=0.202..141.219 rows=138,913 loops=1)

  • Hash Cond: (r.request_type = rt.id)
17. 26.789 112.987 ↓ 36.0 138,913 1

Nested Loop (cost=1.52..3,544.78 rows=3,859 width=171) (actual time=0.194..112.987 rows=138,913 loops=1)

18. 1.650 1.958 ↓ 34.1 1,296 1

Hash Join (cost=1.10..63.78 rows=38 width=36) (actual time=0.021..1.958 rows=1,296 loops=1)

  • Hash Cond: (e.season_id = s.id)
  • Join Filter: (((e.event_date)::date >= (s.start_date)::date) AND ((e.event_date)::date <= (s.end_date)::date))
19. 0.299 0.299 ↑ 1.0 1,371 1

Seq Scan on event e (cost=0.00..57.71 rows=1,371 width=52) (actual time=0.003..0.299 rows=1,371 loops=1)

  • Filter: (is_active IS TRUE)
20. 0.001 0.009 ↑ 1.0 1 1

Hash (cost=1.09..1.09 rows=1 width=80) (actual time=0.009..0.009 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
21. 0.008 0.008 ↑ 1.0 1 1

Seq Scan on season s (cost=0.00..1.09 rows=1 width=80) (actual time=0.008..0.008 rows=1 loops=1)

  • Filter: (is_active AND ((start_year)::text = '2019'::text) AND ((end_year)::text = '2020'::text) AND (((type)::character varying)::text = 'e9d61527-def7-46be-9167-bb1644185768'::text))
  • Rows Removed by Filter: 3
22. 84.240 84.240 ↑ 24.0 107 1,296

Index Scan using idx_request_event_id on request r (cost=0.42..65.89 rows=2,572 width=167) (actual time=0.001..0.065 rows=107 loops=1,296)

  • Index Cond: (event_id = e.id)
  • Filter: ((is_active IS TRUE) AND is_active)
  • Rows Removed by Filter: 0
23. 0.001 0.005 ↓ 2.0 6 1

Hash (cost=1.06..1.06 rows=3 width=16) (actual time=0.005..0.005 rows=6 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
24. 0.004 0.004 ↓ 2.0 6 1

Seq Scan on request_type rt (cost=0.00..1.06 rows=3 width=16) (actual time=0.003..0.004 rows=6 loops=1)

  • Filter: is_active
25. 277.826 277.826 ↑ 1.0 1 138,913

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

  • Index Cond: (id = r.request_details_id)
26. 277.826 277.826 ↑ 1.0 1 138,913

Index Scan using pk_attendee on attendee a (cost=0.42..0.53 rows=1 width=39) (actual time=0.002..0.002 rows=1 loops=138,913)

  • Index Cond: (id = rd.attendee_id)
  • Filter: (is_active IS TRUE)
27. 0.129 0.285 ↑ 1.0 838 1

Hash (cost=20.38..20.38 rows=838 width=29) (actual time=0.285..0.285 rows=838 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 59kB
28. 0.156 0.156 ↑ 1.0 838 1

Seq Scan on "user" u (cost=0.00..20.38 rows=838 width=29) (actual time=0.009..0.156 rows=838 loops=1)

  • Filter: (is_active IS TRUE)
29. 0.080 0.250 ↑ 1.0 838 1

Hash (cost=26.38..26.38 rows=838 width=16) (actual time=0.250..0.250 rows=838 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 48kB
30. 0.170 0.170 ↑ 1.0 838 1

Seq Scan on user_info requestername (cost=0.00..26.38 rows=838 width=16) (actual time=0.007..0.170 rows=838 loops=1)

  • Filter: is_active
31. 0.014 0.048 ↑ 1.0 87 1

Hash (cost=4.06..4.06 rows=87 width=30) (actual time=0.048..0.048 rows=87 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 14kB
32. 0.034 0.034 ↑ 1.0 87 1

Seq Scan on request_status rs (cost=0.00..4.06 rows=87 width=30) (actual time=0.013..0.034 rows=87 loops=1)

  • Filter: (is_active IS TRUE)
  • Rows Removed by Filter: 19
33. 0.038 0.085 ↑ 1.0 375 1

Hash (cost=8.76..8.76 rows=375 width=32) (actual time=0.085..0.085 rows=375 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 32kB
34. 0.047 0.047 ↑ 1.0 375 1

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

  • Filter: is_active
  • Rows Removed by Filter: 1
35. 0.009 0.028 ↓ 1.0 82 1

Hash (cost=3.80..3.80 rows=80 width=16) (actual time=0.028..0.028 rows=82 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
36. 0.019 0.019 ↓ 1.0 82 1

Seq Scan on transaction t (cost=0.00..3.80 rows=80 width=16) (actual time=0.004..0.019 rows=82 loops=1)

  • Filter: is_active