explain.depesz.com

PostgreSQL's explain analyze made readable

Result: C2Bj

Settings
# exclusive inclusive rows x rows loops node
1. 39.837 427.984 ↓ 2,156.4 34,502 1

WindowAgg (cost=748.93..749.21 rows=16 width=403) (actual time=380.252..427.984 rows=34,502 loops=1)

2. 76.548 388.147 ↓ 2,156.4 34,502 1

Sort (cost=748.93..748.97 rows=16 width=395) (actual time=380.208..388.147 rows=34,502 loops=1)

  • Sort Key: sv.road_station_id
  • Sort Method: external merge Disk: 3,744kB
3. 24.479 311.599 ↓ 2,156.4 34,502 1

Nested Loop Left Join (cost=4.33..748.61 rows=16 width=395) (actual time=28.061..311.599 rows=34,502 loops=1)

4. 22.369 218.116 ↓ 2,156.4 34,502 1

Nested Loop (cost=4.20..746.05 rows=16 width=108) (actual time=28.047..218.116 rows=34,502 loops=1)

5. 13.256 66.783 ↓ 859.8 42,988 1

Nested Loop (cost=3.92..731.41 rows=50 width=103) (actual time=1.434..66.783 rows=42,988 loops=1)

6. 0.270 1.847 ↓ 95.0 95 1

Hash Join (cost=3.38..47.02 rows=1 width=54) (actual time=1.287..1.847 rows=95 loops=1)

  • Hash Cond: ((s.natural_id = allowed.natural_id) AND ((s.road_station_type)::text = (allowed.road_station_type)::text))
7. 0.309 0.309 ↑ 1.5 378 1

Seq Scan on road_station_sensor s (cost=0.00..40.58 rows=583 width=68) (actual time=0.004..0.309 rows=378 loops=1)

  • Filter: publishable
  • Rows Removed by Filter: 178
8. 1.248 1.268 ↑ 1.0 95 1

Hash (cost=1.95..1.95 rows=95 width=434) (actual time=1.268..1.268 rows=95 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 13kB
9. 0.020 0.020 ↑ 1.0 95 1

Seq Scan on allowed_road_station_sensor allowed (cost=0.00..1.95 rows=95 width=434) (actual time=0.002..0.020 rows=95 loops=1)

10. 51.680 51.680 ↑ 1.1 453 95

Index Scan using sensor_value_rs_measured_i on sensor_value sv (cost=0.55..679.51 rows=488 width=54) (actual time=0.070..0.544 rows=453 loops=95)

  • Index Cond: ((road_station_sensor_id = s.id) AND (measured > (now() - '00:30:00'::interval)))
11. 128.964 128.964 ↑ 1.0 1 42,988

Index Only Scan using road_station_publishable_weather_u on road_station rs (cost=0.28..0.29 rows=1 width=10) (actual time=0.003..0.003 rows=1 loops=42,988)

  • Index Cond: (id = sv.road_station_id)
  • Heap Fetches: 0
12. 69.004 69.004 ↓ 0.0 0 34,502

Index Scan using svd_pk on sensor_value_description svd (cost=0.14..0.16 rows=1 width=324) (actual time=0.002..0.002 rows=0 loops=34,502)

  • Index Cond: ((sensor_id = sv.road_station_sensor_id) AND (sensor_value = sv.value))
Planning time : 2.055 ms
Execution time : 432.854 ms