explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aob8 : Optimization for: plan #wTvK

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 634.850 6,016.350 ↑ 1.0 999,766 1

Sort (cost=351,582.69..354,082.69 rows=1,000,000 width=33) (actual time=5,760.191..6,016.350 rows=999,766 loops=1)

  • Sort Key: (count(*))
  • Sort Method: external merge Disk: 56680kB
2. 527.851 5,381.500 ↑ 1.0 999,766 1

GroupAggregate (cost=179,733.84..197,233.84 rows=1,000,000 width=33) (actual time=3,927.993..5,381.500 rows=999,766 loops=1)

3. 4,853.649 4,853.649 ↑ 1.0 1,000,000 1

Sort (cost=179,733.84..182,233.84 rows=1,000,000 width=33) (actual time=3,927.986..4,853.649 rows=1,000,000 loops=1)

  • Sort Key: article
  • Sort Method: external merge Disk: 42072kB
  • -> Seq Scan on towns (cost=0.00..25385.00 rows=1000000 width=33) (actual time=0.049..286.553 rows=1000000 loops=1