explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gCva

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

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

  • Group Key: location_id, product_id
2. 0.000 27,716.910 ↑ 3.9 212,000 1

Gather Merge (cost=4,037,367.90..4,306,062.89 rows=832,520 width=16) (actual time=24,444.173..27,716.910 rows=212,000 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 4,860.669 81,927.456 ↑ 5.9 70,667 3

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

  • Group Key: location_id, product_id
4. 46,656.834 77,066.787 ↑ 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,145.765..25,688.929 rows=13,475,113 loops=3)

  • Sort Key: location_id, product_id
  • Sort Method: external merge Disk: 341240kB
5. 30,409.953 30,409.953 ↑ 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.035..10,136.651 rows=13,475,113 loops=3)