explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SSau : Optimization for: plan #pBk3

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 14,076.455 ↑ 4.5 92,769 1

Finalize GroupAggregate (cost=4,037,367.90..4,316,469.39 rows=416,260 width=16) (actual time=10,797.659..14,076.455 rows=92,769 loops=1)

  • Group Key: location_id, product_id
2. 0.000 14,085.856 ↑ 3.9 211,833 1

Gather Merge (cost=4,037,367.90..4,306,062.89 rows=832,520 width=16) (actual time=10,797.650..14,085.856 rows=211,833 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 4,883.769 41,854.983 ↑ 5.9 70,611 3

Partial GroupAggregate (cost=4,036,367.88..4,208,969.40 rows=416,260 width=16) (actual time=10,777.775..13,951.661 rows=70,611 loops=3)

  • Group Key: location_id, product_id
4. 26,754.072 36,971.214 ↑ 1.3 13,475,113 3

Sort (cost=4,036,367.88..4,078,477.61 rows=16,843,892 width=16) (actual time=10,777.765..12,323.738 rows=13,475,113 loops=3)

  • Sort Key: location_id, product_id
  • Sort Method: external merge Disk: 342200kB
5. 10,217.142 10,217.142 ↑ 1.3 13,475,113 3

Parallel Seq Scan on stock_move m (cost=0.00..1,438,896.92 rows=16,843,892 width=16) (actual time=0.074..3,405.714 rows=13,475,113 loops=3)