explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DIav : Optimization for: Optimization for: plan #WM1; plan #XMV1

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.669 150.770 ↑ 1.9 392 1

Nested Loop Left Join (cost=234.34..140,715.27 rows=759 width=345) (actual time=0.534..150.770 rows=392 loops=1)

2. 0.175 0.357 ↑ 1.9 392 1

Hash Left Join (cost=52.62..2,760.74 rows=759 width=111) (actual time=0.063..0.357 rows=392 loops=1)

  • Hash Cond: (wifiaeroscouttags.wat_mac = wifiaeroscouttagsassignmenthistory.watah_mac)
3. 0.133 0.154 ↑ 1.9 392 1

Bitmap Heap Scan on wifiaeroscouttags (cost=22.31..2,727.55 rows=759 width=7) (actual time=0.030..0.154 rows=392 loops=1)

  • Recheck Cond: (wat_active IS TRUE)
  • Heap Blocks: exact=12
4. 0.021 0.021 ↑ 1.9 392 1

Bitmap Index Scan on wat_active_mac (cost=0.00..22.12 rows=759 width=0) (actual time=0.021..0.021 rows=392 loops=1)

5. 0.002 0.028 ↑ 8.0 1 1

Hash (cost=30.21..30.21 rows=8 width=110) (actual time=0.028..0.028 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
6. 0.001 0.026 ↑ 8.0 1 1

Nested Loop (cost=14.57..30.21 rows=8 width=110) (actual time=0.025..0.026 rows=1 loops=1)

7. 0.007 0.019 ↑ 8.0 1 1

Hash Join (cost=14.42..26.95 rows=8 width=82) (actual time=0.018..0.019 rows=1 loops=1)

  • Hash Cond: (nodeslogical.nl_id = wifiaeroscouttagsassignmenthistory.watah_nl_id)
8. 0.004 0.004 ↑ 40.0 5 1

Seq Scan on nodeslogical (cost=0.00..12.00 rows=200 width=72) (actual time=0.004..0.004 rows=5 loops=1)

9. 0.003 0.008 ↑ 8.0 1 1

Hash (cost=14.32..14.32 rows=8 width=18) (actual time=0.008..0.008 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 0.003 0.005 ↑ 8.0 1 1

Bitmap Heap Scan on wifiaeroscouttagsassignmenthistory (cost=4.19..14.32 rows=8 width=18) (actual time=0.004..0.005 rows=1 loops=1)

  • Recheck Cond: (watah_end IS NULL)
  • Heap Blocks: exact=1
11. 0.002 0.002 ↑ 8.0 1 1

Bitmap Index Scan on watah_unique_active_logical (cost=0.00..4.18 rows=8 width=0) (actual time=0.002..0.002 rows=1 loops=1)

12. 0.006 0.006 ↑ 1.0 1 1

Index Scan using entities_pkey on entities (cost=0.15..0.41 rows=1 width=36) (actual time=0.006..0.006 rows=1 loops=1)

  • Index Cond: (e_id = nodeslogical.nl_e_id)
13. 0.392 149.744 ↑ 1.0 1 392

Limit (cost=181.72..181.73 rows=1 width=185) (actual time=0.381..0.382 rows=1 loops=392)

14. 1.568 149.352 ↑ 1.0 1 392

Sort (cost=181.72..181.73 rows=1 width=185) (actual time=0.381..0.381 rows=1 loops=392)

  • Sort Key: wifiaeroscouttagspositionhistory.watph_from DESC
  • Sort Method: top-N heapsort Memory: 25kB
15. 4.312 147.784 ↓ 15.0 15 392

Nested Loop Left Join (cost=44.25..181.71 rows=1 width=185) (actual time=0.084..0.377 rows=15 loops=392)

16. 0.098 143.472 ↓ 15.0 15 392

Nested Loop Left Join (cost=44.11..181.52 rows=1 width=35) (actual time=0.083..0.366 rows=15 loops=392)

17. 1.921 137.592 ↓ 15.0 15 392

Hash Left Join (cost=43.98..181.35 rows=1 width=32) (actual time=0.082..0.351 rows=15 loops=392)

  • Hash Cond: (wifiaeroscouttagspositionhistory.watph_wap_basemac = wifiaccesspointsassignmenthistory.wapah_basemac)
  • Filter: (wifiaccesspointsassignmenthistory.wapah_end IS NULL)
18. 135.632 135.632 ↓ 1.9 15 392

Seq Scan on wifiaeroscouttagspositionhistory (cost=0.00..135.35 rows=8 width=22) (actual time=0.081..0.346 rows=15 loops=392)

  • Filter: (watph_wat_mac = wifiaeroscouttags.wat_mac)
  • Rows Removed by Filter: 6173
19. 0.029 0.039 ↑ 503.3 3 1

Hash (cost=25.10..25.10 rows=1,510 width=18) (actual time=0.004..0.039 rows=3 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 17kB
20. 0.010 0.010 ↑ 503.3 3 1

Seq Scan on wifiaccesspointsassignmenthistory (cost=0.00..25.10 rows=1,510 width=18) (actual time=0.002..0.010 rows=3 loops=1)

21. 5.782 5.782 ↑ 1.0 1 5,782

Index Scan using wifiaccesspoints_pkey on wifiaccesspoints (cost=0.13..0.16 rows=1 width=15) (actual time=0.001..0.001 rows=1 loops=5,782)

  • Index Cond: (wap_basemac = wifiaccesspointsassignmenthistory.wapah_basemac)
22. 0.000 0.000 ↑ 1.0 1 5,782

Index Scan using nodeslogical_pkey on nodeslogical nodeslogical_1 (cost=0.14..0.19 rows=1 width=158) (actual time=0.000..0.000 rows=1 loops=5,782)

  • Index Cond: (nl_id = wifiaccesspointsassignmenthistory.wapah_nl_id)