explain.depesz.com

PostgreSQL's explain analyze made readable

Result: baLx

Settings
# exclusive inclusive rows x rows loops node
1. 80.973 188,790.619 ↓ 639,916.0 639,916 1

Unique (cost=6,481.56..6,481.57 rows=1 width=8) (actual time=188,679.226..188,790.619 rows=639,916 loops=1)

2. 176.980 188,709.646 ↓ 639,916.0 639,916 1

Sort (cost=6,481.56..6,481.56 rows=1 width=8) (actual time=188,679.225..188,709.646 rows=639,916 loops=1)

  • Sort Key: s.id
  • Sort Method: quicksort Memory: 54573kB
3. 0.000 188,532.666 ↓ 639,916.0 639,916 1

Nested Loop (cost=566.33..6,481.55 rows=1 width=8) (actual time=241.183..188,532.666 rows=639,916 loops=1)

  • Join Filter: ((s.theater_day >= (rr.released_at)::date) AND (s.theater_day <= ((rr.released_at)::date + '7 days'::interval)))
  • Rows Removed by Join Filter: 1665196
4. 5,381.009 5,553.499 ↓ 15,342.2 30,730,431 1

Hash Join (cost=565.77..2,060.62 rows=2,003 width=75) (actual time=162.931..5,553.499 rows=30,730,431 loops=1)

  • Hash Cond: (t.country_id = rr.id_country)
5. 9.603 9.603 ↑ 1.0 36,423 1

Seq Scan on relevant_theater t (cost=0.00..1,338.23 rows=36,423 width=14) (actual time=0.031..9.603 rows=36,423 loops=1)

6. 8.417 162.887 ↓ 2,519.1 27,710 1

Hash (cost=565.63..565.63 rows=11 width=73) (actual time=162.887..162.887 rows=27,710 loops=1)

  • Buckets: 32768 (originally 1024) Batches: 1 (originally 1) Memory Usage: 2611kB
7. 14.459 154.470 ↓ 2,519.1 27,710 1

Nested Loop (cost=0.42..565.63 rows=11 width=73) (actual time=0.115..154.470 rows=27,710 loops=1)

8. 56.881 56.881 ↓ 2,519.1 27,710 1

Seq Scan on relevant_release rr (cost=0.00..536.51 rows=11 width=40) (actual time=0.025..56.881 rows=27,710 loops=1)

  • Filter: (released_at ~ '^(?:[0-9]{4}-[0-9]{2}-[0-9]{2})$'::text)
  • Rows Removed by Filter: 731
9. 83.130 83.130 ↑ 1.0 1 27,710

Index Only Scan using relevant_movie_idx on relevant_movie m (cost=0.42..2.64 rows=1 width=45) (actual time=0.003..0.003 rows=1 loops=27,710)

  • Index Cond: (id = rr.id_movie)
  • Heap Fetches: 27710
10. 184,382.586 184,382.586 ↓ 0.0 0 30,730,431

Index Scan using relevant_showtime_idx on relevant_showtime s (cost=0.56..2.18 rows=1 width=59) (actual time=0.006..0.006 rows=0 loops=30,730,431)

  • Index Cond: ((id_theater = t.theater_id) AND ((gid_entity)::ltree = (m.gid)::ltree))