explain.depesz.com

PostgreSQL's explain analyze made readable

Result: i5GQ

Settings
# exclusive inclusive rows x rows loops node
1. 172.973 2,358.917 ↑ 7.7 155,863 1

Merge Join (cost=74,697.00..100,335.06 rows=1,199,944 width=473) (actual time=2,088.946..2,358.917 rows=155,863 loops=1)

  • Merge Cond: (((m.gid)::ltree = (s.gid_entity)::ltree) AND (m.id_country = t.country_id))
2. 495.495 561.352 ↑ 1.0 218,516 1

Sort (cost=24,434.11..24,980.51 rows=218,558 width=116) (actual time=552.536..561.352 rows=218,516 loops=1)

  • Sort Key: m.gid, m.id_country
  • Sort Method: quicksort Memory: 37240kB
3. 65.857 65.857 ↑ 1.0 218,558 1

Seq Scan on aggregate_movie m (cost=0.00..5,050.58 rows=218,558 width=116) (actual time=0.021..65.857 rows=218,558 loops=1)

4. 1,424.577 1,624.592 ↑ 1.0 219,611 1

Sort (cost=50,262.88..50,811.91 rows=219,611 width=393) (actual time=1,536.382..1,624.592 rows=219,611 loops=1)

  • Sort Key: s.gid_entity, t.country_id
  • Sort Method: external sort Disk: 227944kB
5. 87.726 200.015 ↑ 1.0 219,611 1

Hash Join (cost=1,767.69..30,778.35 rows=219,611 width=393) (actual time=22.079..200.015 rows=219,611 loops=1)

  • Hash Cond: (s.code_theater = t.theater_id)
6. 90.265 90.265 ↑ 1.0 219,611 1

Seq Scan on aggregate_showtime s (cost=0.00..28,434.11 rows=219,611 width=88) (actual time=0.011..90.265 rows=219,611 loops=1)

7. 12.258 22.024 ↑ 1.0 37,364 1

Hash (cost=1,300.64..1,300.64 rows=37,364 width=329) (actual time=22.024..22.024 rows=37,364 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 7703kB
8. 9.766 9.766 ↑ 1.0 37,364 1

Seq Scan on aggregate_theater t (cost=0.00..1,300.64 rows=37,364 width=329) (actual time=0.007..9.766 rows=37,364 loops=1)

Planning time : 0.510 ms
Execution time : 2,399.599 ms