explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6Rib

Settings
# exclusive inclusive rows x rows loops node
1. 2.895 52,908.106 ↑ 1,001.0 58 1

Subquery Scan on t (cost=6,047,935.77..6,425,309.58 rows=58,058 width=45) (actual time=52,868.988..52,908.106 rows=58 loops=1)

  • Filter: (t.row_number = 1)
  • Rows Removed by Filter: 60033
2. 31.348 52,905.211 ↑ 193.2 60,091 1

WindowAgg (cost=6,047,935.77..6,280,165.81 rows=11,611,502 width=50) (actual time=52,868.986..52,905.211 rows=60,091 loops=1)

3. 41.447 52,873.863 ↑ 193.2 60,091 1

Sort (cost=6,047,935.77..6,076,964.52 rows=11,611,502 width=37) (actual time=52,868.976..52,873.863 rows=60,091 loops=1)

  • Sort Key: id.odberne_miesto_id, id.measured_value DESC
  • Sort Method: quicksort Memory: 6237kB
4. 67.499 52,832.416 ↑ 193.2 60,091 1

Hash Join (cost=449.39..4,367,878.59 rows=11,611,502 width=37) (actual time=5,282.251..52,832.416 rows=60,091 loops=1)

  • Hash Cond: (id.odberne_miesto_id = om.id)
  • Join Filter: (id.measured_at > om.cas_poslednej_kontroly_udalosti)
  • Rows Removed by Join Filter: 362589
5. 52,760.188 52,760.188 ↑ 122.3 422,680 1

Seq Scan on intervalove_data id (cost=0.00..4,231,744.92 rows=51,674,224 width=37) (actual time=262.526..52,760.188 rows=422,680 loops=1)

  • Filter: ((rk > '0'::numeric) AND ((measured_value / rk) >= 0.9))
  • Rows Removed by Filter: 156754652
6. 0.841 4.729 ↑ 1.0 4,011 1

Hash (cost=399.25..399.25 rows=4,011 width=16) (actual time=4.729..4.729 rows=4,011 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 221kB
7. 3.888 3.888 ↑ 1.0 4,011 1

Seq Scan on odberne_miesto om (cost=0.00..399.25 rows=4,011 width=16) (actual time=0.075..3.888 rows=4,011 loops=1)

  • Filter: ((time_invalidated IS NULL) AND (cas_poslednej_kontroly_udalosti < now()))
  • Rows Removed by Filter: 1939
Planning time : 0.905 ms
Execution time : 52,908.176 ms