explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZTa6

Settings
# exclusive inclusive rows x rows loops node
1. 174.740 5,386.655 ↓ 6.0 227,661 1

Sort (cost=63,243.18..63,337.41 rows=37,694 width=20) (actual time=5,351.151..5,386.655 rows=227,661 loops=1)

  • Sort Key: ce1.start_time, ce1.last_event_seating_asked_at
  • Sort Method: quicksort Memory: 23931kB
2. 2,829.613 5,211.915 ↓ 6.0 227,661 1

Nested Loop Anti Join (cost=1.23..60,378.05 rows=37,694 width=20) (actual time=0.664..5,211.915 rows=227,661 loops=1)

  • Join Filter: (eslq1.event_id = ce1.id)
  • Rows Removed by Join Filter: 28237590
3. 57.644 560.022 ↓ 6.0 227,785 1

Nested Loop (cost=0.98..59,810.37 rows=37,694 width=20) (actual time=0.034..560.022 rows=227,785 loops=1)

  • Join Filter: (ce1.consecutive_unsuccessful_event_seating_lookup_count < c1.maximum_consecutive_unsuccessful_event_seating_lookup_count)
4. 0.682 6.890 ↑ 1.3 2,212 1

Nested Loop (cost=0.56..2,527.29 rows=2,870 width=8) (actual time=0.011..6.890 rows=2,212 loops=1)

5. 1.478 1.478 ↑ 1.0 430 1

Index Scan using cinema_pkey on cinema c1 (cost=0.28..567.64 rows=430 width=8) (actual time=0.005..1.478 rows=430 loops=1)

  • Filter: (data_aggregation_disabled_at IS NULL)
  • Rows Removed by Filter: 386
6. 4.730 4.730 ↓ 1.2 5 430

Index Scan using public_venue_cinema_id0_idx on venue v1 (cost=0.28..4.52 rows=4 width=8) (actual time=0.003..0.011 rows=5 loops=430)

  • Index Cond: (cinema_id = c1.id)
7. 495.488 495.488 ↑ 1.1 103 2,212

Index Scan using current_event_venue_id_start_time_idx on current_event ce1 (cost=0.42..18.50 rows=117 width=28) (actual time=0.007..0.224 rows=103 loops=2,212)

  • Index Cond: ((venue_id = v1.id) AND (start_time > now()))
8. 1,821.691 1,822.280 ↓ 124.0 124 227,785

Materialize (cost=0.25..2.27 rows=1 width=4) (actual time=0.000..0.008 rows=124 loops=227,785)

9. 0.589 0.589 ↓ 124.0 124 1

Index Only Scan using event_seating_lookup_queue_event_id_idx on event_seating_lookup_queue eslq1 (cost=0.25..2.27 rows=1 width=4) (actual time=0.068..0.589 rows=124 loops=1)

  • Heap Fetches: 1339
Planning time : 0.801 ms
Execution time : 5,400.241 ms