explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Hv29

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=23,504,494.88..35,086,565.48 rows=24,113 width=54) (actual rows= loops=)

  • Group Key: social_movie.gid
2. 0.000 0.000 ↓ 0.0

Sort (cost=23,504,494.88..23,801,450.96 rows=118,782,430 width=156) (actual rows= loops=)

  • Sort Key: social_movie.gid
3. 0.000 0.000 ↓ 0.0

Merge Join (cost=1.55..2,104,217.85 rows=118,782,430 width=156) (actual rows= loops=)

  • Merge Cond: (mr.id_movie = social_movie.id)
4. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=1.00..83,201.93 rows=358,674 width=123) (actual rows= loops=)

  • Merge Cond: (mr.id_movie = s.id_movie)
5. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=0.72..82,068.37 rows=358,674 width=86) (actual rows= loops=)

  • Merge Cond: (mr.id_movie = ri.id)
6. 0.000 0.000 ↓ 0.0

Index Scan using movie_has_release_id_movie_idx on movie_has_release mr (cost=0.43..76,982.26 rows=358,674 width=85) (actual rows= loops=)

  • Filter: active
7. 0.000 0.000 ↓ 0.0

Materialize (cost=0.29..863.62 rows=33,196 width=9) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Index Scan using release_in_future_ac_idx on release_in_future_ac ri (cost=0.29..780.63 rows=33,196 width=9) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Materialize (cost=0.28..58.26 rows=1,782 width=45) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Index Scan using showtimes_ac_idx on showtimes_ac s (cost=0.28..53.81 rows=1,782 width=45) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Materialize (cost=0.56..255,284.43 rows=6,731,306 width=45) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Index Only Scan using social_movie_gid_ac_idx on social_movie_ac social_movie (cost=0.56..238,456.17 rows=6,731,306 width=45) (actual rows= loops=)