explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YuqV

Settings
# exclusive inclusive rows x rows loops node
1. 0.359 14.583 ↓ 1.8 1,082 1

Hash Join (cost=849.48..917.72 rows=590 width=252) (actual time=14.096..14.583 rows=1,082 loops=1)

  • Hash Cond: (this_.id = device_feed_filter_view.device_feed_id)
2. 0.146 0.146 ↑ 1.0 1,132 1

Seq Scan on device_feed this_ (cost=0.00..61.81 rows=1,181 width=252) (actual time=0.008..0.146 rows=1,132 loops=1)

3. 0.180 14.078 ↓ 5.4 1,082 1

Hash (cost=846.98..846.98 rows=200 width=4) (actual time=14.078..14.078 rows=1,082 loops=1)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 55kB
4. 0.457 13.898 ↓ 5.4 1,082 1

HashAggregate (cost=844.98..846.98 rows=200 width=4) (actual time=13.744..13.898 rows=1,082 loops=1)

  • Group Key: device_feed_filter_view.device_feed_id
5. 0.174 13.441 ↑ 1.9 1,374 1

Subquery Scan on device_feed_filter_view (cost=743.22..838.62 rows=2,544 width=4) (actual time=12.613..13.441 rows=1,374 loops=1)

6. 0.533 13.267 ↑ 1.9 1,374 1

Unique (cost=743.22..813.18 rows=2,544 width=124) (actual time=12.611..13.267 rows=1,374 loops=1)

7. 0.560 12.734 ↑ 1.9 1,374 1

Sort (cost=743.22..749.58 rows=2,544 width=124) (actual time=12.611..12.734 rows=1,374 loops=1)

  • Sort Key: df.id, df.device_id, df.source_id, df.feed_type, df.archive_path, d.station_id, (2), (st_setsrid(st_makepoint((s.lon)::double precision, (s.lat)::double precision), 4326)), sa.agent_id, p.parameter_group_id
  • Sort Method: quicksort Memory: 257kB
8. 0.119 12.174 ↑ 1.9 1,374 1

Append (cost=510.29..599.32 rows=2,544 width=124) (actual time=10.678..12.174 rows=1,374 loops=1)

9. 1.156 12.047 ↑ 1.9 1,374 1

Unique (cost=510.29..573.86 rows=2,543 width=153) (actual time=10.678..12.047 rows=1,374 loops=1)

10. 4.415 10.891 ↑ 1.1 2,318 1

Sort (cost=510.29..516.65 rows=2,543 width=153) (actual time=10.677..10.891 rows=2,318 loops=1)

  • Sort Key: df.id, df.device_id, df.source_id, df.feed_type, df.archive_path, d.station_id, (st_setsrid(st_makepoint((s.lon)::double precision, (s.lat)::double precision), 4326)), sa.agent_id, p.parameter_group_id
  • Sort Method: quicksort Memory: 442kB
11. 3.553 6.476 ↑ 1.1 2,318 1

Hash Left Join (cost=226.06..366.45 rows=2,543 width=153) (actual time=1.603..6.476 rows=2,318 loops=1)

  • Hash Cond: (d.station_id = sa.station_id)
12. 0.332 2.500 ↑ 1.1 1,082 1

Hash Left Join (cost=163.92..242.08 rows=1,137 width=127) (actual time=1.157..2.500 rows=1,082 loops=1)

  • Hash Cond: (d.sensor_parameter_id = sp.id)
13. 0.344 1.922 ↑ 1.1 1,082 1

Hash Join (cost=136.94..199.47 rows=1,137 width=127) (actual time=0.904..1.922 rows=1,082 loops=1)

  • Hash Cond: (d.station_id = s.id)
14. 0.408 1.242 ↑ 1.0 1,096 1

Hash Join (cost=76.57..123.52 rows=1,142 width=113) (actual time=0.563..1.242 rows=1,096 loops=1)

  • Hash Cond: (d.id = df.device_id)
15. 0.289 0.289 ↑ 1.3 1,097 1

Seq Scan on device d (cost=0.00..30.33 rows=1,386 width=12) (actual time=0.008..0.289 rows=1,097 loops=1)

  • Filter: visible
  • Rows Removed by Filter: 36
16. 0.230 0.545 ↑ 1.0 1,132 1

Hash (cost=61.81..61.81 rows=1,181 width=105) (actual time=0.545..0.545 rows=1,132 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 81kB
17. 0.315 0.315 ↑ 1.0 1,132 1

Seq Scan on device_feed df (cost=0.00..61.81 rows=1,181 width=105) (actual time=0.002..0.315 rows=1,132 loops=1)

18. 0.120 0.336 ↓ 1.0 655 1

Hash (cost=52.40..52.40 rows=637 width=18) (actual time=0.336..0.336 rows=655 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 42kB
19. 0.216 0.216 ↓ 1.0 655 1

Seq Scan on station s (cost=0.00..52.40 rows=637 width=18) (actual time=0.005..0.216 rows=655 loops=1)

  • Filter: visible
  • Rows Removed by Filter: 5
20. 0.024 0.246 ↑ 1.4 277 1

Hash (cost=22.31..22.31 rows=374 width=8) (actual time=0.246..0.246 rows=277 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
21. 0.095 0.222 ↑ 1.4 277 1

Hash Left Join (cost=10.80..22.31 rows=374 width=8) (actual time=0.106..0.222 rows=277 loops=1)

  • Hash Cond: (sp.parameter_id = p.id)
22. 0.034 0.034 ↑ 1.4 277 1

Seq Scan on sensor_parameter sp (cost=0.00..6.74 rows=374 width=8) (actual time=0.008..0.034 rows=277 loops=1)

23. 0.027 0.093 ↑ 1.2 219 1

Hash (cost=7.58..7.58 rows=258 width=8) (actual time=0.093..0.093 rows=219 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
24. 0.066 0.066 ↑ 1.2 219 1

Seq Scan on parameter p (cost=0.00..7.58 rows=258 width=8) (actual time=0.007..0.066 rows=219 loops=1)

25. 0.183 0.423 ↑ 1.1 1,344 1

Hash (cost=43.73..43.73 rows=1,473 width=8) (actual time=0.423..0.423 rows=1,344 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 69kB
26. 0.240 0.240 ↑ 1.1 1,344 1

Seq Scan on station_agent sa (cost=0.00..43.73 rows=1,473 width=8) (actual time=0.006..0.240 rows=1,344 loops=1)

27. 0.001 0.008 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=0.01..0.03 rows=1 width=124) (actual time=0.008..0.008 rows=0 loops=1)

28. 0.000 0.007 ↓ 0.0 0 1

Unique (cost=0.01..0.02 rows=1 width=124) (actual time=0.007..0.007 rows=0 loops=1)

29. 0.007 0.007 ↓ 0.0 0 1

Sort (cost=0.01..0.02 rows=0 width=124) (actual time=0.007..0.007 rows=0 loops=1)

  • Sort Key: id, source_id, station_id, (st_setsrid(st_makepoint((lon)::double precision, (lat)::double precision), 4326)), agent_id, parameter_group_id
  • Sort Method: quicksort Memory: 25kB
30. 0.000 0.000 ↓ 0.0 0 1

Result (cost=0.00..0.00 rows=0 width=124) (actual time=0.000..0.000 rows=0 loops=1)

  • One-Time Filter: false