explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hdnb : Optimization for: Optimization for: Optimization for: Optimization for: plan #pme6; plan #kU7kn; plan #dVY2; plan #13Ge

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.041 611.478 ↑ 75,000.0 24 1

Finalize GroupAggregate (cost=145,475.02..419,249.14 rows=1,800,000 width=76) (actual time=326.743..611.478 rows=24 loops=1)

  • Group Key: date, ((doc ->> 'health'::text))
2. 0.000 611.437 ↑ 18,145.2 96 1

Gather Merge (cost=145,475.02..370,474.95 rows=1,741,935 width=76) (actual time=313.955..611.437 rows=96 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
3. 831.444 2,115.044 ↑ 24,193.5 24 4

Partial GroupAggregate (cost=144,474.98..164,797.55 rows=580,645 width=76) (actual time=266.199..528.761 rows=24 loops=4)

  • Group Key: date, ((doc ->> 'health'::text))
4. 785.296 1,283.600 ↑ 1.3 450,000 4

Sort (cost=144,474.98..145,926.59 rows=580,645 width=90) (actual time=251.614..320.900 rows=450,000 loops=4)

  • Sort Key: date, ((doc ->> 'health'::text))
  • Sort Method: external merge Disk: 39528kB
  • Worker 0: Sort Method: external merge Disk: 32928kB
  • Worker 1: Sort Method: external merge Disk: 32784kB
  • Worker 2: Sort Method: external merge Disk: 28736kB
5. 498.304 498.304 ↑ 1.3 450,000 4

Parallel Seq Scan on snapshot (cost=0.00..29,344.06 rows=580,645 width=90) (actual time=0.021..124.576 rows=450,000 loops=4)

Planning time : 0.130 ms
Execution time : 615.444 ms