explain.depesz.com

PostgreSQL's explain analyze made readable

Result: D7Lo

Settings
# exclusive inclusive rows x rows loops node
1. 6.528 28,447.761 ↑ 4.5 92,769 1

Finalize GroupAggregate (cost=4,037,367.90..4,316,469.39 rows=416,260 width=16) (actual time=24,750.786..28,447.761 rows=92,769 loops=1)

  • Group Key: location_id, product_id
2. 0.000 28,441.233 ↑ 3.9 211,979 1

Gather Merge (cost=4,037,367.90..4,306,062.89 rows=832,520 width=16) (actual time=24,750.781..28,441.233 rows=211,979 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 5,066.163 83,734.815 ↑ 5.9 70,660 3

Partial GroupAggregate (cost=4,036,367.88..4,208,969.40 rows=416,260 width=16) (actual time=24,459.859..27,911.605 rows=70,660 loops=3)

  • Group Key: location_id, product_id
4. 50,186.583 78,668.652 ↑ 1.3 13,475,113 3

Sort (cost=4,036,367.88..4,078,477.61 rows=16,843,892 width=16) (actual time=24,459.849..26,222.884 rows=13,475,113 loops=3)

  • Sort Key: location_id, product_id
  • Sort Method: external merge Disk: 339360kB
5. 28,482.069 28,482.069 ↑ 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.113..9,494.023 rows=13,475,113 loops=3)

Planning time : 0.518 ms
Execution time : 28,515.678 ms