explain.depesz.com

PostgreSQL's explain analyze made readable

Result: okci : Optimization for: Optimization for: plan #T3UG; plan #KiYP

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 3,559.181 5,183.858 ↑ 1.0 1,942,373 1

Hash Join (cost=409.75..122,195.96 rows=1,946,411 width=285) (actual time=1.334..5,183.858 rows=1,942,373 loops=1)

  • Hash Cond: (wifiactivetagspositionhistory.watph_wap_basemac = wifiaccesspoints.wap_basemac)
2. 471.883 1,624.303 ↑ 1.0 1,942,373 1

Hash Left Join (cost=350.52..52,746.52 rows=1,946,411 width=99) (actual time=0.940..1,624.303 rows=1,942,373 loops=1)

  • Hash Cond: (wifiactivetags.wat_mac = wifiactivetagsassignmenthistory.watah_mac)
3. 665.929 1,152.319 ↑ 1.0 1,942,373 1

Hash Join (cost=315.22..45,350.58 rows=1,946,411 width=28) (actual time=0.811..1,152.319 rows=1,942,373 loops=1)

  • Hash Cond: (wifiactivetagspositionhistory.watph_wat_mac = wifiactivetags.wat_mac)
4. 485.617 485.617 ↑ 1.0 1,942,373 1

Seq Scan on wifiactivetagspositionhistory (cost=0.00..39,891.77 rows=1,946,411 width=28) (actual time=0.008..485.617 rows=1,942,373 loops=1)

  • Filter: (watph_wap_basemac IS NOT NULL)
  • Rows Removed by Filter: 128204
5. 0.125 0.773 ↑ 1.0 632 1

Hash (cost=307.32..307.32 rows=632 width=6) (actual time=0.772..0.773 rows=632 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 32kB
6. 0.648 0.648 ↑ 1.0 632 1

Seq Scan on wifiactivetags (cost=0.00..307.32 rows=632 width=6) (actual time=0.008..0.648 rows=632 loops=1)

  • Filter: (wat_active IS TRUE)
7. 0.007 0.101 ↑ 1.0 2 1

Hash (cost=35.27..35.27 rows=2 width=77) (actual time=0.101..0.101 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
8. 0.004 0.094 ↑ 1.0 2 1

Nested Loop Left Join (cost=0.99..35.27 rows=2 width=77) (actual time=0.080..0.094 rows=2 loops=1)

9. 0.002 0.082 ↑ 1.0 2 1

Nested Loop Left Join (cost=0.70..18.66 rows=2 width=46) (actual time=0.069..0.082 rows=2 loops=1)

10. 0.001 0.048 ↑ 1.0 2 1

Nested Loop (cost=0.57..18.30 rows=2 width=42) (actual time=0.037..0.048 rows=2 loops=1)

11. 0.005 0.029 ↑ 1.0 2 1

Nested Loop (cost=0.29..17.63 rows=2 width=43) (actual time=0.022..0.029 rows=2 loops=1)

12. 0.008 0.008 ↑ 1.0 2 1

Seq Scan on wifiactivetagsassignmenthistory (cost=0.00..1.02 rows=2 width=10) (actual time=0.007..0.008 rows=2 loops=1)

  • Filter: (watah_end IS NULL)
13. 0.016 0.016 ↑ 1.0 1 2

Index Scan using nodeslogical_pkey on nodeslogical nla (cost=0.29..8.30 rows=1 width=37) (actual time=0.008..0.008 rows=1 loops=2)

  • Index Cond: (nl_id = wifiactivetagsassignmenthistory.watah_nl_id)
14. 0.018 0.018 ↑ 1.0 1 2

Index Scan using entities_pkey on entities (cost=0.29..0.34 rows=1 width=7) (actual time=0.009..0.009 rows=1 loops=2)

  • Index Cond: (e_id = nla.nl_e_id)
15. 0.032 0.032 ↓ 0.0 0 2

Index Only Scan using tdh_index_active on tagdeviceshistory (cost=0.13..0.17 rows=1 width=8) (actual time=0.016..0.016 rows=0 loops=2)

  • Index Cond: (tdh_nl_lamp_id = nla.nl_id)
  • Heap Fetches: 0
16. 0.008 0.008 ↓ 0.0 0 2

Index Scan using nodeslogical_pkey on nodeslogical nlp (cost=0.29..8.30 rows=1 width=33) (actual time=0.004..0.004 rows=0 loops=2)

  • Index Cond: (nl_id = tagdeviceshistory.tdh_nl_personnel_id)
17. 0.029 0.374 ↑ 1.0 85 1

Hash (cost=58.18..58.18 rows=85 width=65) (actual time=0.374..0.374 rows=85 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
18. 0.042 0.345 ↑ 1.0 85 1

Hash Left Join (cost=25.98..58.18 rows=85 width=65) (actual time=0.055..0.345 rows=85 loops=1)

  • Hash Cond: (wifiaccesspoints.wap_basemac = wifiaccesspointsassignmenthistory.wapah_basemac)
19. 0.268 0.268 ↑ 1.0 85 1

Seq Scan on wifiaccesspoints (cost=0.00..31.85 rows=85 width=12) (actual time=0.009..0.268 rows=85 loops=1)

20. 0.010 0.035 ↑ 1.0 3 1

Hash (cost=25.94..25.94 rows=3 width=59) (actual time=0.035..0.035 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
21. 0.004 0.025 ↑ 1.0 3 1

Nested Loop Left Join (cost=0.29..25.94 rows=3 width=59) (actual time=0.017..0.025 rows=3 loops=1)

22. 0.009 0.009 ↑ 1.0 3 1

Seq Scan on wifiaccesspointsassignmenthistory (cost=0.00..1.03 rows=3 width=10) (actual time=0.007..0.009 rows=3 loops=1)

  • Filter: (wapah_end IS NULL)
23. 0.012 0.012 ↑ 1.0 1 3

Index Scan using nodeslogical_pkey on nodeslogical (cost=0.29..8.30 rows=1 width=53) (actual time=0.004..0.004 rows=1 loops=3)

  • Index Cond: (nl_id = wifiaccesspointsassignmenthistory.wapah_nl_id)
Planning time : 2.148 ms