explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 46l

Settings
# exclusive inclusive rows x rows loops node
1. 75,531.775 812,751.921 ↓ 1.9 45,262 1

GroupAggregate (cost=36,169,552.62..37,718,805.96 rows=23,531 width=45) (actual time=406,957.624..812,751.921 rows=45,262 loops=1)

  • Group Key: social_movie.gid
  • Planning time: 150.699 ms
  • Execution time: 814041.591 ms
2. 668,965.549 737,220.146 ↓ 1.8 370,633,672 1

Sort (cost=36,169,552.62..36,685,891.96 rows=206,535,738 width=45) (actual time=406,956.501..737,220.146 rows=370,633,672 loops=1)

  • Sort Key: social_movie.gid
  • Sort Method: external merge Disk: 21034032kB
3. 48,854.308 68,254.597 ↓ 1.8 370,633,672 1

Merge Join (cost=105,499.87..3,923,816.85 rows=206,535,738 width=45) (actual time=491.302..68,254.597 rows=370,633,672 loops=1)

  • Merge Cond: (social_movie.id = ((mr.id_movie)::bigint))
4. 2,396.855 2,396.855 ↑ 1.0 5,943,658 1

Index Scan using social_movie_id_idx on social_movie (cost=0.43..174,223.70 rows=5,943,658 width=45) (actual time=115.497..2,396.855 rows=5,943,658 loops=1)

5. 16,823.783 17,003.434 ↓ 453.4 370,731,626 1

Sort (cost=105,499.44..107,543.63 rows=817,677 width=12) (actual time=375.796..17,003.434 rows=370,731,626 loops=1)

  • Sort Key: ((mr.id_movie)::bigint)
  • Sort Method: quicksort Memory: 77519kB
6. 179.651 179.651 ↑ 1.2 677,661 1

Seq Scan on movie_has_release mr (cost=0.00..25,198.77 rows=817,677 width=12) (actual time=0.015..179.651 rows=677,661 loops=1)