explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LhYi

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.019 ↓ 0.0 0 1

Nested Loop (cost=85.36..91.52 rows=1 width=276) (actual time=0.019..0.019 rows=0 loops=1)

  • Join Filter: (a.config <> m.config)
2.          

CTE m

3. 0.000 0.000 ↓ 0.0 0

Seq Scan on connectors c (cost=0.00..18.58 rows=1 width=138) (never executed)

  • Filter: ((protocol = 'ModbusRTU'::text) AND ((config ->> 'serialPort'::text) = '/dev/tty'::text))
4.          

CTE a

5. 0.002 0.017 ↓ 0.0 0 1

Hash Join (cost=47.88..66.79 rows=245 width=138) (actual time=0.017..0.017 rows=0 loops=1)

  • Hash Cond: (connectors.id = device_configs.collector_id)
6. 0.007 0.007 ↑ 490.0 1 1

Seq Scan on connectors (cost=0.00..14.90 rows=490 width=138) (actual time=0.007..0.007 rows=1 loops=1)

7. 0.001 0.008 ↓ 0.0 0 1

Hash (cost=45.38..45.38 rows=200 width=8) (actual time=0.008..0.008 rows=0 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
8. 0.001 0.007 ↓ 0.0 0 1

HashAggregate (cost=43.38..45.38 rows=200 width=8) (actual time=0.007..0.007 rows=0 loops=1)

  • Group Key: device_configs.collector_id
9. 0.002 0.006 ↓ 0.0 0 1

Hash Join (cost=20.33..42.08 rows=518 width=8) (actual time=0.006..0.006 rows=0 loops=1)

  • Hash Cond: (device_configs.device_id = devices.id)
10. 0.003 0.003 ↑ 520.0 1 1

Seq Scan on device_configs (cost=0.00..15.20 rows=520 width=16) (actual time=0.003..0.003 rows=1 loops=1)

11. 0.000 0.001 ↓ 0.0 0 1

Hash (cost=14.60..14.60 rows=458 width=8) (actual time=0.001..0.001 rows=0 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
12. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on devices (cost=0.00..14.60 rows=458 width=8) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: (edge_device_id IS NOT NULL)
13. 0.018 0.018 ↓ 0.0 0 1

CTE Scan on a (cost=0.00..6.12 rows=1 width=138) (actual time=0.018..0.018 rows=0 loops=1)

  • Filter: ((config ->> 'serialPort'::text) = '/dev/tty'::text)
14. 0.000 0.000 ↓ 0.0 0

CTE Scan on m (cost=0.00..0.02 rows=1 width=138) (never executed)

Planning time : 0.373 ms
Execution time : 0.074 ms