explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iM4w

Settings
# exclusive inclusive rows x rows loops node
1. 1.701 185.338 ↑ 10.9 3,455 1

Sort (cost=23,068.38..23,162.43 rows=37,620 width=58) (actual time=184.956..185.338 rows=3,455 loops=1)

  • Sort Key: mesreg.smpdate
  • Sort Method: quicksort Memory: 1,878kB
2. 38.618 183.637 ↑ 10.9 3,455 1

GroupAggregate (cost=18,798.65..19,833.20 rows=37,620 width=58) (actual time=141.860..183.637 rows=3,455 loops=1)

  • Group Key: a.smpid, mesreg.smpdate, mesreg.alarm, mesreg.received
3. 22.719 145.019 ↓ 1.9 72,555 1

Sort (cost=18,798.65..18,892.70 rows=37,620 width=38) (actual time=141.812..145.019 rows=72,555 loops=1)

  • Sort Key: a.smpid, mesreg.smpdate, mesreg.alarm, mesreg.received
  • Sort Method: quicksort Memory: 8,741kB
4. 52.222 122.300 ↓ 1.9 72,555 1

Gather (cost=1,444.73..15,939.68 rows=37,620 width=38) (actual time=106.228..122.300 rows=72,555 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 30.250 70.078 ↓ 1.5 24,185 3 / 3

Hash Join (cost=444.73..11,177.68 rows=15,675 width=38) (actual time=61.735..70.078 rows=24,185 loops=3)

  • Hash Cond: (a.smpid = mesreg.smpid)
6. 33.058 33.058 ↑ 1.2 249,467 3 / 3

Parallel Seq Scan on mesval a (cost=0.00..9,914.33 rows=311,833 width=20) (actual time=0.017..33.058 rows=249,467 loops=3)

7. 1.317 6.770 ↓ 1.0 3,455 3 / 3

Hash (cost=402.38..402.38 rows=3,388 width=26) (actual time=6.770..6.770 rows=3,455 loops=3)

  • Buckets: 4,096 Batches: 1 Memory Usage: 248kB
8. 5.453 5.453 ↓ 1.0 3,455 3 / 3

Index Scan using index_mesreg_2 on mesreg (cost=0.29..402.38 rows=3,388 width=26) (actual time=0.067..5.453 rows=3,455 loops=3)

  • Index Cond: ((smpdate >= '2020-06-01 00:00:00+02'::timestamp with time zone) AND (smpdate <= '2020-06-30 00:00:00+02'::timestamp with time zone))
  • Filter: (((paramtype)::text = ANY ('{FIL,UPL}'::text[])) AND (stationid = 4))
  • Rows Removed by Filter: 3,457