explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Sy8o

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 26,466.900 ↑ 4.5 92,769 1

Finalize GroupAggregate (cost=4,037,367.90..4,316,469.39 rows=416,260 width=16) (actual time=23,067.665..26,466.900 rows=92,769 loops=1)

  • Group Key: location_id, product_id
2. 0.000 26,470.875 ↑ 3.9 211,714 1

Gather Merge (cost=4,037,367.90..4,306,062.89 rows=832,520 width=16) (actual time=23,067.660..26,470.875 rows=211,714 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 4,926.255 78,923.211 ↑ 5.9 70,571 3

Partial GroupAggregate (cost=4,036,367.88..4,208,969.40 rows=416,260 width=16) (actual time=23,043.657..26,307.737 rows=70,571 loops=3)

  • Group Key: location_id, product_id
4. 51,408.717 73,996.956 ↑ 1.3 13,475,113 3

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

  • Sort Key: location_id, product_id
  • Sort Method: external merge Disk: 337064kB
5. 22,588.239 22,588.239 ↑ 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.029..7,529.413 rows=13,475,113 loops=3)