explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ofA5

Settings
# exclusive inclusive rows x rows loops node
1. 0.403 16.247 ↓ 139.0 278 1

GroupAggregate (cost=118.63..118.75 rows=2 width=241) (actual time=15.833..16.247 rows=278 loops=1)

  • Group Key: r.away_team, (CASE WHEN ((rt.display_name)::text = 'Purchase'::text) THEN ''::character varying ELSE d.name 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 ''::character varying ELSE r.gl_code END)
2. 2.426 15.844 ↓ 224.5 449 1

Sort (cost=118.63..118.63 rows=2 width=233) (actual time=15.818..15.844 rows=449 loops=1)

  • Sort Key: r.away_team, (CASE WHEN ((rt.display_name)::text = 'Purchase'::text) THEN ''::character varying ELSE d.name 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 ''::character varying ELSE r.gl_code END)
  • Sort Method: quicksort Memory: 144kB
3. 0.525 13.418 ↓ 224.5 449 1

Nested Loop Left Join (cost=95.79..118.62 rows=2 width=233) (actual time=10.091..13.418 rows=449 loops=1)

4. 0.251 12.444 ↓ 224.5 449 1

Nested Loop Left Join (cost=95.52..117.83 rows=2 width=425) (actual time=10.068..12.444 rows=449 loops=1)

5. 0.449 11.295 ↓ 224.5 449 1

Nested Loop (cost=95.23..109.87 rows=2 width=433) (actual time=10.051..11.295 rows=449 loops=1)

6. 0.252 10.397 ↓ 224.5 449 1

Hash Right Join (cost=95.09..109.40 rows=2 width=435) (actual time=10.035..10.397 rows=449 loops=1)

  • Hash Cond: (rtm.request_id = r.id)
7. 0.125 0.125 ↑ 1.1 276 1

Seq Scan on request_ticket_map rtm (cost=0.00..13.12 rows=312 width=32) (actual time=0.005..0.125 rows=276 loops=1)

  • Filter: is_active
  • Rows Removed by Filter: 110
8. 0.283 10.020 ↓ 139.0 278 1

Hash (cost=95.06..95.06 rows=2 width=435) (actual time=10.020..10.020 rows=278 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 74kB
9. 0.204 9.737 ↓ 139.0 278 1

Hash Right Join (cost=84.88..95.06 rows=2 width=435) (actual time=9.449..9.737 rows=278 loops=1)

  • Hash Cond: (uam.account_id = r.account_id)
10. 0.101 0.101 ↑ 1.0 375 1

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

  • Filter: is_active
  • Rows Removed by Filter: 1
11. 0.302 9.432 ↓ 139.0 278 1

Hash (cost=84.85..84.85 rows=2 width=435) (actual time=9.432..9.432 rows=278 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 74kB
12. 0.259 9.130 ↓ 139.0 278 1

Nested Loop (cost=60.68..84.85 rows=2 width=435) (actual time=5.218..9.130 rows=278 loops=1)

13. 0.325 8.315 ↓ 139.0 278 1

Nested Loop (cost=60.53..84.19 rows=2 width=451) (actual time=5.203..8.315 rows=278 loops=1)

14. 0.333 7.434 ↓ 139.0 278 1

Nested Loop (cost=60.26..82.89 rows=2 width=453) (actual time=5.188..7.434 rows=278 loops=1)

15. 0.152 6.545 ↓ 139.0 278 1

Nested Loop (cost=59.98..81.58 rows=2 width=455) (actual time=5.172..6.545 rows=278 loops=1)

16. 0.329 5.837 ↓ 69.5 278 1

Nested Loop (cost=59.85..80.83 rows=4 width=253) (actual time=5.153..5.837 rows=278 loops=1)

  • Join Filter: (s.type = st.id)
  • Rows Removed by Join Filter: 556
17. 0.222 5.508 ↓ 39.7 278 1

Hash Join (cost=59.85..79.59 rows=7 width=237) (actual time=5.138..5.508 rows=278 loops=1)

  • Hash Cond: (r.event_id = e.id)
18. 0.175 0.175 ↓ 1.0 278 1

Seq Scan on request r (cost=0.00..18.67 rows=267 width=206) (actual time=0.019..0.175 rows=278 loops=1)

  • Filter: (is_active AND is_active)
19. 0.527 5.111 ↓ 36.3 1,271 1

Hash (cost=59.41..59.41 rows=35 width=63) (actual time=5.110..5.111 rows=1,271 loops=1)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 134kB
20. 4.270 4.584 ↓ 36.3 1,271 1

Hash Join (cost=1.10..59.41 rows=35 width=63) (actual time=0.056..4.584 rows=1,271 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))
21. 0.291 0.291 ↑ 1.0 1,271 1

Seq Scan on event e (cost=0.00..53.71 rows=1,271 width=63) (actual time=0.007..0.291 rows=1,271 loops=1)

22. 0.004 0.023 ↑ 1.0 1 1

Hash (cost=1.09..1.09 rows=1 width=96) (actual time=0.023..0.023 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
23. 0.019 0.019 ↑ 1.0 1 1

Seq Scan on season s (cost=0.00..1.09 rows=1 width=96) (actual time=0.017..0.019 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
24. 0.000 0.000 ↓ 1.5 3 278

Materialize (cost=0.00..1.05 rows=2 width=48) (actual time=0.000..0.000 rows=3 loops=278)

25. 0.008 0.008 ↓ 1.5 3 1

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

  • Filter: is_active
  • Rows Removed by Filter: 1
26. 0.556 0.556 ↑ 1.0 1 278

Index Scan using pk_request_type on request_type rt (cost=0.13..0.19 rows=1 width=234) (actual time=0.002..0.002 rows=1 loops=278)

  • Index Cond: (id = r.request_type)
  • Filter: is_active
27. 0.556 0.556 ↑ 1.0 1 278

Index Scan using pk_user_info on user_info creatorname (cost=0.28..0.65 rows=1 width=30) (actual time=0.002..0.002 rows=1 loops=278)

  • Index Cond: (id = r.creator)
  • Filter: is_active
28. 0.556 0.556 ↑ 1.0 1 278

Index Scan using pk_user_info on user_info requestername (cost=0.28..0.65 rows=1 width=30) (actual time=0.002..0.002 rows=1 loops=278)

  • Index Cond: (id = r.requester)
  • Filter: is_active
29. 0.556 0.556 ↑ 1.0 1 278

Index Scan using pk_request_details on request_details rd (cost=0.15..0.33 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=278)

  • Index Cond: (id = r.request_details_id)
  • Filter: is_active
30. 0.449 0.449 ↑ 1.0 1 449

Index Scan using pk_request_status on request_status rs (cost=0.14..0.23 rows=1 width=30) (actual time=0.001..0.001 rows=1 loops=449)

  • Index Cond: (id = r.request_status)
  • Filter: (is_active IS TRUE)
31. 0.898 0.898 ↑ 1.0 1 449

Index Scan using pk_ticket on ticket ti (cost=0.29..3.98 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=449)

  • Index Cond: (id = rtm.ticket_id)
  • Filter: is_active
32. 0.449 0.449 ↑ 1.0 1 449

Index Scan using pk_department on department d (cost=0.27..0.39 rows=1 width=37) (actual time=0.001..0.001 rows=1 loops=449)

  • Index Cond: (uam.department_id = id)
  • Filter: is_active
Planning time : 6.327 ms