explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Bpv0 : Optimization for: Optimization for: plan #XqEg; plan #vXp

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 35.829 72.788 ↓ 1.7 10,709 1

Hash Join (cost=1,341.67..7,207.80 rows=6,418 width=4,362) (actual time=53.741..72.788 rows=10,709 loops=1)

  • Hash Cond: (dt.device_entry_id = de.id)
2. 13.355 13.355 ↓ 1.0 143,087 1

Seq Scan on device_tool dt (cost=0.00..2,397.78 rows=142,978 width=46) (actual time=0.008..13.355 rows=143,087 loops=1)

3. 2.464 23.604 ↓ 1.7 1,118 1

Hash (cost=979.35..979.35 rows=666 width=4,316) (actual time=23.604..23.604 rows=1,118 loops=1)

  • Buckets: 1024 Batches: 4 Memory Usage: 152kB
4. 0.804 21.140 ↓ 1.7 1,118 1

Hash Join (cost=611.27..979.35 rows=666 width=4,316) (actual time=15.966..21.140 rows=1,118 loops=1)

  • Hash Cond: (de.request_status_id = rs.id)
5. 0.667 20.323 ↓ 1.7 1,118 1

Hash Join (cost=610.07..968.99 rows=666 width=3,628) (actual time=15.936..20.323 rows=1,118 loops=1)

  • Hash Cond: (de.site_id = s.id)
6. 0.718 19.636 ↓ 1.7 1,118 1

Hash Join (cost=608.57..958.34 rows=666 width=2,667) (actual time=15.904..19.636 rows=1,118 loops=1)

  • Hash Cond: (m.vendor_id = v.id)
7. 0.598 18.860 ↓ 1.7 1,118 1

Hash Join (cost=605.91..946.51 rows=666 width=1,512) (actual time=15.834..18.860 rows=1,118 loops=1)

  • Hash Cond: (de.usage_type_id = ut.id)
8. 0.579 18.255 ↓ 1.3 1,118 1

Hash Join (cost=604.77..935.46 rows=868 width=943) (actual time=15.820..18.255 rows=1,118 loops=1)

  • Hash Cond: (de.device_type_id = dty.id)
9. 3.148 17.663 ↑ 1.1 1,118 1

Hash Join (cost=603.53..921.11 rows=1,178 width=374) (actual time=15.800..17.663 rows=1,118 loops=1)

  • Hash Cond: (m.id = de.model_id)
10. 1.826 1.826 ↑ 1.0 13,222 1

Seq Scan on model m (cost=0.00..256.22 rows=13,222 width=42) (actual time=0.006..1.826 rows=13,222 loops=1)

11. 1.907 12.689 ↑ 1.2 1,118 1

Hash (cost=587.00..587.00 rows=1,322 width=332) (actual time=12.689..12.689 rows=1,118 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 314kB
12. 1.810 10.782 ↑ 1.2 1,118 1

Hash Join (cost=1.07..587.00 rows=1,322 width=332) (actual time=6.505..10.782 rows=1,118 loops=1)

  • Hash Cond: (de.protocol_id = p.id)
13. 8.965 8.965 ↑ 1.0 3,271 1

Seq Scan on device_entry de (cost=0.00..560.38 rows=3,289 width=221) (actual time=0.234..8.965 rows=3,271 loops=1)

  • Filter: active
  • Rows Removed by Filter: 11560
14. 0.004 0.007 ↓ 1.3 4 1

Hash (cost=1.03..1.03 rows=3 width=111) (actual time=0.007..0.007 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
15. 0.003 0.003 ↓ 1.3 4 1

Seq Scan on protocol p (cost=0.00..1.03 rows=3 width=111) (actual time=0.002..0.003 rows=4 loops=1)

16. 0.009 0.013 ↓ 1.5 16 1

Hash (cost=1.11..1.11 rows=11 width=569) (actual time=0.013..0.013 rows=16 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
17. 0.004 0.004 ↓ 1.5 16 1

Seq Scan on device_type dty (cost=0.00..1.11 rows=11 width=569) (actual time=0.002..0.004 rows=16 loops=1)

18. 0.004 0.007 ↓ 1.2 7 1

Hash (cost=1.06..1.06 rows=6 width=569) (actual time=0.007..0.007 rows=7 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
19. 0.003 0.003 ↓ 1.2 7 1

Seq Scan on usage_type ut (cost=0.00..1.06 rows=6 width=569) (actual time=0.002..0.003 rows=7 loops=1)

20. 0.034 0.058 ↓ 1.1 80 1

Hash (cost=1.74..1.74 rows=74 width=1,155) (actual time=0.058..0.058 rows=80 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 6kB
21. 0.024 0.024 ↓ 1.1 80 1

Seq Scan on vendor v (cost=0.00..1.74 rows=74 width=1,155) (actual time=0.008..0.024 rows=80 loops=1)

22. 0.010 0.020 ↓ 1.1 24 1

Hash (cost=1.22..1.22 rows=22 width=961) (actual time=0.020..0.020 rows=24 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
23. 0.010 0.010 ↓ 1.1 24 1

Seq Scan on site s (cost=0.00..1.22 rows=22 width=961) (actual time=0.005..0.010 rows=24 loops=1)

24. 0.005 0.013 ↑ 1.0 9 1

Hash (cost=1.09..1.09 rows=9 width=688) (actual time=0.013..0.013 rows=9 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
25. 0.008 0.008 ↑ 1.0 9 1

Seq Scan on request_status rs (cost=0.00..1.09 rows=9 width=688) (actual time=0.004..0.008 rows=9 loops=1)