explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nQUN

Settings
# exclusive inclusive rows x rows loops node
1. 0.246 839.448 ↑ 20,000.0 2 1

HashAggregate (cost=68,468.08..68,868.08 rows=40,000 width=38) (actual time=839.308..839.448 rows=2 loops=1)

  • Group Key: device.mac, device.ip
2. 55.015 839.202 ↑ 121,175.0 2 1

Hash Join (cost=53,321.23..67,256.33 rows=242,350 width=38) (actual time=704.711..839.202 rows=2 loops=1)

  • Hash Cond: (device.mac = (unnest('{00:04:23:d2:5a:f9,00:00:0c:07:ac:0a,f8:0f:6f:39:53:c5,70:79:b3:98:ea:c0,00:27:e3:1f:f3:40}'::macaddr[])))
3. 388.206 784.145 ↑ 1.2 400,181 1

HashAggregate (cost=53,318.48..58,165.47 rows=484,699 width=13) (actual time=637.500..784.145 rows=400,181 loops=1)

  • Group Key: device.ip, device.mac
4. 56.080 395.939 ↑ 1.0 484,699 1

Append (cost=0.00..50,894.98 rows=484,699 width=13) (actual time=0.035..395.939 rows=484,699 loops=1)

5. 23.160 23.160 ↑ 1.0 8,569 1

Seq Scan on device (cost=0.00..12,301.69 rows=8,569 width=13) (actual time=0.035..23.160 rows=8,569 loops=1)

6. 316.699 316.699 ↑ 1.0 476,130 1

Seq Scan on device_port (cost=0.00..33,746.30 rows=476,130 width=13) (actual time=0.010..316.699 rows=476,130 loops=1)

7. 0.015 0.042 ↑ 20.0 5 1

Hash (cost=1.51..1.51 rows=100 width=6) (actual time=0.042..0.042 rows=5 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 1kB
8. 0.027 0.027 ↑ 20.0 5 1

Result (cost=0.00..0.51 rows=100 width=0) (actual time=0.021..0.027 rows=5 loops=1)

Planning time : 0.653 ms
Execution time : 843.282 ms