explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xLYG

Settings
# exclusive inclusive rows x rows loops node
1. 0.585 104.021 ↓ 12.3 3,455 1

Sort (cost=16,014.34..16,015.04 rows=280 width=24) (actual time=103.927..104.021 rows=3,455 loops=1)

  • Sort Key: b.compdate
  • Sort Method: quicksort Memory: 366kB
2.          

CTE tmp1

3. 2.573 2.573 ↓ 1.0 3,455 1

Index Scan using index_mesreg_2 on mesreg (cost=0.29..402.38 rows=3,388 width=16) (actual time=0.018..2.573 rows=3,455 loops=1)

  • 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
4. 0.729 103.436 ↓ 12.3 3,455 1

Hash Join (cost=15,513.08..15,600.58 rows=280 width=24) (actual time=102.534..103.436 rows=3,455 loops=1)

  • Hash Cond: (b.smpid = a.smpid)
5. 0.217 0.217 ↓ 1.0 3,455 1

CTE Scan on tmp1 b (cost=0.00..67.76 rows=3,388 width=16) (actual time=0.021..0.217 rows=3,455 loops=1)

6. 0.629 102.490 ↓ 1.2 3,455 1

Hash (cost=15,475.71..15,475.71 rows=2,990 width=24) (actual time=102.489..102.490 rows=3,455 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 221kB
7. 1.559 101.861 ↓ 1.2 3,455 1

Hash Join (cost=15,280.64..15,475.71 rows=2,990 width=24) (actual time=97.180..101.861 rows=3,455 loops=1)

  • Hash Cond: (b_1.smpid = a.smpid)
8. 3.279 3.279 ↓ 1.0 3,455 1

CTE Scan on tmp1 b_1 (cost=0.00..67.76 rows=3,388 width=8) (actual time=0.000..3.279 rows=3,455 loops=1)

9. 0.000 97.023 ↓ 1.0 33,200 1

Hash (cost=14,882.12..14,882.12 rows=31,882 width=16) (actual time=97.023..97.023 rows=33,200 loops=1)

  • Buckets: 65,536 (originally 32768) Batches: 1 (originally 1) Memory Usage: 2,069kB
10. 65.123 98.487 ↓ 1.0 33,200 1

Gather (cost=1,000.00..14,882.12 rows=31,882 width=16) (actual time=0.956..98.487 rows=33,200 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
11. 33.364 33.364 ↑ 1.2 11,067 3 / 3

Parallel Seq Scan on mesval a (cost=0.00..10,693.92 rows=13,284 width=16) (actual time=0.026..33.364 rows=11,067 loops=3)

  • Filter: (channelid = 2)
  • Rows Removed by Filter: 238,400