explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 56SN : Optimization for: plan #EqgP

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.346 5,120.909 ↓ 1.1 511 1

Finalize GroupAggregate (cost=117,639.44..117,760.55 rows=478 width=12) (actual time=5,116.083..5,120.909 rows=511 loops=1)

  • Group Key: p.sensor_id
2. 11.360 5,120.563 ↓ 1.5 1,479 1

Gather Merge (cost=117,639.44..117,750.99 rows=956 width=12) (actual time=5,116.059..5,120.563 rows=1,479 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 0.214 5,109.203 ↓ 1.0 493 3 / 3

Sort (cost=116,639.42..116,640.62 rows=478 width=12) (actual time=5,109.143..5,109.203 rows=493 loops=3)

  • Sort Key: p.sensor_id DESC
  • Sort Method: quicksort Memory: 47kB
  • Worker 0: Sort Method: quicksort Memory: 48kB
  • Worker 1: Sort Method: quicksort Memory: 48kB
4. 4,869.552 5,108.989 ↓ 1.0 493 3 / 3

Partial HashAggregate (cost=116,613.37..116,618.15 rows=478 width=12) (actual time=5,108.909..5,108.989 rows=493 loops=3)

  • Group Key: p.sensor_id
5. 116.854 239.437 ↑ 1.3 637,845 3 / 3

Nested Loop (cost=0.00..44,731.99 rows=798,682 width=605) (actual time=0.086..239.437 rows=637,845 loops=3)

6. 51.711 51.711 ↑ 1.3 70,872 3 / 3

Parallel Seq Scan on pours p (cost=0.00..28,758.42 rows=88,742 width=573) (actual time=0.067..51.711 rows=70,872 loops=3)

7. 70.872 70.872 ↑ 1.0 9 212,615 / 3

Function Scan on unnest u1 (cost=0.00..0.09 rows=9 width=32) (actual time=0.000..0.001 rows=9 loops=212,615)

Planning time : 1.291 ms
Execution time : 5,121.148 ms