explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FEBo

Settings
# exclusive inclusive rows x rows loops node
1. 0.028 1,571.635 ↑ 327.9 8 1

Sort (cost=36,257.24..36,263.79 rows=2,623 width=20) (actual time=1,571.634..1,571.635 rows=8 loops=1)

  • Sort Key: ce1.start_time, ce1.last_event_seating_asked_at
  • Sort Method: quicksort Memory: 25kB
2. 0.023 1,571.607 ↑ 327.9 8 1

Hash Anti Join (cost=843.99..36,108.29 rows=2,623 width=20) (actual time=88.346..1,571.607 rows=8 loops=1)

  • Hash Cond: (ce1.id = eslq1.event_id)
3. 19.157 1,571.339 ↑ 327.9 8 1

Nested Loop (cost=841.71..36,072.89 rows=2,623 width=20) (actual time=88.089..1,571.339 rows=8 loops=1)

4. 6.920 1,322.292 ↓ 7.9 22,989 1

Nested Loop (cost=841.28..33,043.29 rows=2,920 width=20) (actual time=7.563..1,322.292 rows=22,989 loops=1)

  • Join Filter: (ce1.consecutive_unsuccessful_event_seating_lookup_count < c1.maximum_consecutive_unsuccessful_event_seating_lookup_count)
5. 1.314 28.963 ↓ 8.1 1,889 1

Hash Join (cost=840.85..1,410.50 rows=234 width=8) (actual time=5.276..28.963 rows=1,889 loops=1)

  • Hash Cond: (gp1.timezone_id = t1.id)
6. 2.698 27.536 ↓ 8.1 1,889 1

Nested Loop (cost=830.00..1,399.02 rows=234 width=12) (actual time=5.154..27.536 rows=1,889 loops=1)

7. 0.812 18.397 ↓ 9.2 2,147 1

Nested Loop (cost=829.72..1,291.74 rows=234 width=12) (actual time=5.143..18.397 rows=2,147 loops=1)

8. 0.838 9.005 ↓ 12.3 429 1

Nested Loop (cost=829.43..1,132.23 rows=35 width=12) (actual time=5.133..9.005 rows=429 loops=1)

9. 0.349 5.719 ↓ 4.1 816 1

Unique (cost=829.16..834.23 rows=200 width=12) (actual time=5.120..5.719 rows=816 loops=1)

10. 0.452 5.370 ↑ 1.2 831 1

Sort (cost=829.16..831.70 rows=1,015 width=12) (actual time=5.119..5.370 rows=831 loops=1)

  • Sort Key: "*SELECT* 1".cinema_id, ((0)::bigint) DESC
  • Sort Method: quicksort Memory: 63kB
11. 0.413 4.918 ↑ 1.2 831 1

HashAggregate (cost=758.17..768.32 rows=1,015 width=12) (actual time=4.736..4.918 rows=831 loops=1)

  • Group Key: "*SELECT* 1".cinema_id, ((0)::bigint)
12. 0.085 4.505 ↑ 1.2 831 1

Append (cost=0.28..753.10 rows=1,015 width=12) (actual time=0.009..4.505 rows=831 loops=1)

13. 0.135 0.474 ↑ 1.0 816 1

Subquery Scan on *SELECT* 1 (cost=0.28..86.72 rows=816 width=12) (actual time=0.009..0.474 rows=816 loops=1)

14. 0.339 0.339 ↑ 1.0 816 1

Index Only Scan using cinema_pkey on cinema c1_1 (cost=0.28..76.52 rows=816 width=8) (actual time=0.008..0.339 rows=816 loops=1)

  • Heap Fetches: 66
15. 0.052 3.946 ↑ 13.3 15 1

HashAggregate (cost=657.33..659.32 rows=199 width=12) (actual time=3.942..3.946 rows=15 loops=1)

  • Group Key: e1_1.cinema_id
16. 0.006 3.894 ↑ 1.4 141 1

Nested Loop (cost=0.85..656.33 rows=199 width=4) (actual time=0.068..3.894 rows=141 loops=1)

17. 2.619 2.619 ↑ 1.4 141 1

Index Scan using event_seating_lookup_ended_at_idx on event_seating_lookup esl1 (cost=0.42..170.28 rows=199 width=4) (actual time=0.052..2.619 rows=141 loops=1)

  • Index Cond: (ended_at IS NULL)
18. 1.269 1.269 ↑ 1.0 1 141

Index Scan using event_pkey on event e1_1 (cost=0.43..2.44 rows=1 width=8) (actual time=0.009..0.009 rows=1 loops=141)

  • Index Cond: (id = esl1.event_id)
19. 2.448 2.448 ↑ 1.0 1 816

Index Scan using cinema_pkey on cinema c1 (cost=0.28..1.47 rows=1 width=12) (actual time=0.003..0.003 rows=1 loops=816)

  • Index Cond: (id = "*SELECT* 1".cinema_id)
  • Filter: ((data_aggregation_disabled_at IS NULL) AND (((0)::bigint) < maximum_event_seating_lookup_concurrency))
  • Rows Removed by Filter: 0
20. 8.580 8.580 ↓ 1.2 5 429

Index Scan using public_venue_cinema_id0_idx on venue v1 (cost=0.28..4.52 rows=4 width=12) (actual time=0.005..0.020 rows=5 loops=429)

  • Index Cond: (cinema_id = c1.id)
21. 6.441 6.441 ↑ 1.0 1 2,147

Index Scan using google_place_pkey on google_place gp1 (cost=0.29..0.46 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=2,147)

  • Index Cond: (id = v1.google_place_id)
22. 0.041 0.113 ↑ 1.0 260 1

Hash (cost=7.60..7.60 rows=260 width=4) (actual time=0.113..0.113 rows=260 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 18kB
23. 0.072 0.072 ↑ 1.0 260 1

Seq Scan on timezone t1 (cost=0.00..7.60 rows=260 width=4) (actual time=0.018..0.072 rows=260 loops=1)

24. 1,286.409 1,286.409 ↑ 9.3 12 1,889

Index Scan using current_event_venue_id_idx on current_event ce1 (cost=0.42..133.78 rows=112 width=28) (actual time=0.471..0.681 rows=12 loops=1,889)

  • Index Cond: (venue_id = v1.id)
  • Filter: ((event_seating_updated_at IS NOT NULL) AND (unrecoverable_error IS NULL) AND (start_time > now()) AND (CASE WHEN ((last_event_seating_asked_at < (now() - '00:05:00'::interval)) AND (start_time < (now() + '00:15:00'::interval))) THEN 'NEXT_IMMEDIATE'::text WHEN ((last_event_seating_asked_at < (now() - '00:10:00'::interval)) AND (start_time < (now() + '01:00:00'::interval))) THEN 'NEXT_HOUR'::text WHEN ((last_event_seating_asked_at < (now() - '03:00:00'::interval)) AND (start_time < (now() + '1 day'::interval))) THEN 'NEXT_DAY'::text WHEN ((last_event_seating_asked_at < (now() - '06:00:00'::interval)) AND (start_time < (now() + '7 days'::interval))) THEN 'NEXT_WEEK'::text WHEN ((last_event_seating_asked_at < (now() - '06:00:00'::interval)) AND (start_time < (now() + '1 mon'::interval))) THEN 'NEXT_MONTH'::text WHEN (last_event_seating_asked_at < (now() - '12:00:00'::interval)) THEN 'NEXT_FUTURE'::text ELSE NULL::text END IS NOT NULL) AND ((consecutive_unsuccessful_event_seating_lookup_count = 0) OR (last_event_seating_asked_at < (now() - ('00:00:01'::interval * (bound_power((consecutive_unsuccessful_event_seating_lookup_count + 1), 4, 1, 1440))::double precision)))))
  • Rows Removed by Filter: 239
25. 229.890 229.890 ↓ 0.0 0 22,989

Index Scan using event_pkey on event e1 (cost=0.43..1.04 rows=1 width=4) (actual time=0.010..0.010 rows=0 loops=22,989)

  • Index Cond: (id = ce1.id)
  • Filter: ((unlisted_at IS NULL) AND (auditorium_id IS NOT NULL))
  • Rows Removed by Filter: 1
26. 0.000 0.245 ↓ 0.0 0 1

Hash (cost=2.27..2.27 rows=1 width=4) (actual time=0.245..0.245 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
27. 0.245 0.245 ↓ 0.0 0 1

Index Scan using event_seating_lookup_queue_attempted_at_idx on event_seating_lookup_queue eslq1 (cost=0.25..2.27 rows=1 width=4) (actual time=0.245..0.245 rows=0 loops=1)

  • Index Cond: (attempted_at IS NULL)
Planning time : 4.114 ms
Execution time : 1,571.879 ms