explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WXZI

Settings
# exclusive inclusive rows x rows loops node
1. 13,495.212 574,000.864 ↑ 15.1 54,506 1

GroupAggregate (cost=2,555,022.46..7,017,038.12 rows=821,142 width=43) (actual time=552,864.957..574,000.864 rows=54,506 loops=1)

  • Group Key: brand_movie_month.id_brand, brand_movie_month.id_movie
2. 15,073.717 560,505.652 ↑ 2.9 4,619,676 1

Sort (cost=2,555,022.46..2,589,054.75 rows=13,612,917 width=234) (actual time=552,864.222..560,505.652 rows=4,619,676 loops=1)

  • Sort Key: brand_movie_month.id_brand, brand_movie_month.id_movie
  • Sort Method: external merge Disk: 1,466,776kB
3. 805.336 545,431.935 ↑ 2.9 4,619,676 1

Nested Loop (cost=773.54..42,664.83 rows=13,612,917 width=234) (actual time=7.094..545,431.935 rows=4,619,676 loops=1)

4. 13.441 16.949 ↓ 55.0 11,010 1

HashAggregate (cost=773.10..775.10 rows=200 width=32) (actual time=7.075..16.949 rows=11,010 loops=1)

  • Group Key: (relevant_month_data.id_entity)::bigint
5. 3.508 3.508 ↑ 1.0 16,808 1

Seq Scan on relevant_month_data (cost=0.00..731.08 rows=16,808 width=32) (actual time=0.007..3.508 rows=16,808 loops=1)

6. 544,609.650 544,609.650 ↓ 2.1 420 11,010

Index Scan using brand_movie_month_id_movie_idx on brand_movie_month (cost=0.44..207.46 rows=199 width=234) (actual time=0.011..49.465 rows=420 loops=11,010)

  • Index Cond: (id_movie = (relevant_month_data.id_entity)::bigint)
Planning time : 0.587 ms
Execution time : 574,132.003 ms