explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rapl

Settings
# exclusive inclusive rows x rows loops node
1. 27.384 2,730.824 ↓ 3.8 994 1

Unique (cost=236,561.18..238,790.67 rows=265 width=33) (actual time=2,277.268..2,730.824 rows=994 loops=1)

2. 1,200.111 2,703.440 ↓ 1.0 450,662 1

Sort (cost=236,561.18..237,675.92 rows=445,899 width=33) (actual time=2,277.267..2,703.440 rows=450,662 loops=1)

  • Sort Key: outfit.id_user_app, (COALESCE(outfit_ranking_temp_a.star_count_at_week, 0)) DESC, (COALESCE(outfit_ranking_temp_a.outfit_post_datetime, '1970-07-16 00:00:00'::timestamp without time zone)) DESC
  • Sort Method: external merge Disk: 18472kB
3. 560.372 1,503.329 ↓ 1.0 450,662 1

Hash Join (cost=63,602.70..182,527.67 rows=445,899 width=33) (actual time=516.627..1,503.329 rows=450,662 loops=1)

  • Hash Cond: (outfit.id_outfit = outfit_ranking_temp_a.id_outfit)
4. 426.853 426.853 ↑ 2.0 500,747 1

Seq Scan on outfit (cost=0.00..94,817.42 rows=986,016 width=17) (actual time=0.034..426.853 rows=500,747 loops=1)

  • Filter: ((NOT private_flag) AND (deleted_at IS NULL))
  • Rows Removed by Filter: 499253
5. 200.524 516.104 ↓ 1.0 900,000 1

Hash (cost=47,958.98..47,958.98 rows=899,898 width=16) (actual time=516.104..516.104 rows=900,000 loops=1)

  • Buckets: 131072 Batches: 16 Memory Usage: 3888kB
6. 315.580 315.580 ↓ 1.0 900,000 1

Seq Scan on outfit_ranking_temp_a (cost=0.00..47,958.98 rows=899,898 width=16) (actual time=0.011..315.580 rows=900,000 loops=1)

  • Filter: (id_outfit IS NOT NULL)
Planning time : 0.242 ms
Execution time : 2,734.639 ms