explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 36bv

Settings
# exclusive inclusive rows x rows loops node
1. 40.702 269.152 ↑ 1.1 3,455 1

GroupAggregate (cost=19,444.66..20,056.59 rows=3,766 width=58) (actual time=220.622..269.152 rows=3,455 loops=1)

  • Group Key: a.smpdate, a.smpid, a.alarm, a.received
2. 59.002 228.450 ↓ 1.9 72,555 1

Sort (cost=19,444.66..19,538.80 rows=37,657 width=38) (actual time=220.581..228.450 rows=72,555 loops=1)

  • Sort Key: a.smpdate, a.smpid, a.alarm, a.received
  • Sort Method: external merge Disk: 4,016kB
3. 43.182 169.448 ↓ 1.9 72,555 1

Finalize HashAggregate (cost=15,829.46..16,206.03 rows=37,657 width=38) (actual time=153.507..169.448 rows=72,555 loops=1)

  • Group Key: a.smpid, b.channelid
4. 56.136 126.266 ↓ 2.3 72,555 1

Gather (cost=12,299.21..15,594.11 rows=31,380 width=38) (actual time=110.005..126.266 rows=72,555 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 14.709 70.130 ↓ 1.5 24,185 3 / 3

Partial HashAggregate (cost=11,299.21..11,456.11 rows=15,690 width=38) (actual time=63.700..70.130 rows=24,185 loops=3)

  • Group Key: a.smpid, b.channelid
6. 26.468 55.421 ↓ 1.5 24,185 3 / 3

Hash Join (cost=444.73..11,181.54 rows=15,690 width=38) (actual time=46.821..55.421 rows=24,185 loops=3)

  • Hash Cond: (b.smpid = a.smpid)
7. 24.008 24.008 ↑ 1.3 249,467 3 / 3

Parallel Seq Scan on mesval b (cost=0.00..9,917.39 rows=312,139 width=20) (actual time=0.021..24.008 rows=249,467 loops=3)

8. 0.900 4.945 ↓ 1.0 3,455 3 / 3

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

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

Index Scan using index_mesreg_2 on mesreg a (cost=0.29..402.38 rows=3,388 width=26) (actual time=0.072..4.045 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