explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gHwh : Optimization for: plan #cq6L

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.212 815.946 ↑ 50,000.0 36 1

Finalize GroupAggregate (cost=30,510.40..141,366.25 rows=1,800,000 width=68) (actual time=526.123..815.946 rows=36 loops=1)

  • Group Key: ((doc ->> 'health'::text)), date
2. 0.000 815.734 ↑ 6,250.0 288 1

Gather Merge (cost=30,510.40..96,366.25 rows=1,800,000 width=68) (actual time=517.532..815.734 rows=288 loops=1)

  • Workers Planned: 20
  • Workers Launched: 7
3. 1,537.392 5,570.912 ↑ 2,500.0 36 8

Partial GroupAggregate (cost=30,499.94..33,424.94 rows=90,000 width=68) (actual time=452.626..696.364 rows=36 loops=8)

  • Group Key: ((doc ->> 'health'::text)), date
4. 3,044.096 4,033.520 ↓ 2.5 225,000 8

Sort (cost=30,499.94..30,724.94 rows=90,000 width=89) (actual time=445.830..504.190 rows=225,000 loops=8)

  • Sort Key: ((doc ->> 'health'::text)), date
  • Sort Method: quicksort Memory: 51747kB
  • Worker 0: Sort Method: quicksort Memory: 38268kB
  • Worker 1: Sort Method: quicksort Memory: 35675kB
  • Worker 2: Sort Method: quicksort Memory: 38129kB
  • Worker 3: Sort Method: quicksort Memory: 38396kB
  • Worker 4: Sort Method: quicksort Memory: 38107kB
  • Worker 5: Sort Method: quicksort Memory: 30791kB
  • Worker 6: Sort Method: quicksort Memory: 37311kB
5. 989.424 989.424 ↓ 2.5 225,000 8

Parallel Seq Scan on snapshot (cost=0.00..23,094.00 rows=90,000 width=89) (actual time=0.070..123.678 rows=225,000 loops=8)

Planning time : 0.100 ms
Execution time : 820.783 ms