explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KsFn : CTE test 2

Settings
# exclusive inclusive rows x rows loops node
1. 1,301.999 97,116.284 ↑ 31.5 52,731 1

GroupAggregate (cost=773,067.20..901,850.26 rows=1,661,717 width=287) (actual time=77,362.613..97,116.284 rows=52,731 loops=1)

  • Group Key: sensornn.dev_id, signature.sig_id, iphdr.ip_src, iphdr.ip_dst, sensornn.cl_id
2.          

CTE sensornn

3. 0.028 0.028 ↑ 1.0 49 1

Seq Scan on sensor (cost=0.00..2.49 rows=49 width=19) (actual time=0.012..0.028 rows=49 loops=1)

  • Filter: ((handler_group_2_shifts IS NOT NULL) OR (handler_group_3_shifts IS NOT NULL) OR (handler_group_4_shifts IS NOT NULL) OR (handler_group_5_shifts IS NOT NULL) OR (handler_group_6_shifts IS NOT NULL) OR (handler_group_7_shifts IS NOT NULL) OR (handler_group_8_shifts IS NOT NULL) OR (handler_group_9_shifts IS NOT NULL) OR (handler_group_10_shifts IS NOT NULL))
4. 54,433.567 95,814.285 ↑ 1.0 1,649,246 1

Sort (cost=773,064.71..777,219.00 rows=1,661,717 width=177) (actual time=77,362.591..95,814.285 rows=1,649,246 loops=1)

  • Sort Key: sensornn.dev_id, signature.sig_id, iphdr.ip_src, iphdr.ip_dst, sensornn.cl_id
  • Sort Method: external merge Disk: 229,656kB
5. 628.255 41,380.718 ↑ 1.0 1,649,246 1

Hash Left Join (cost=109,454.29..306,023.09 rows=1,661,717 width=177) (actual time=9,662.026..41,380.718 rows=1,649,246 loops=1)

  • Hash Cond: ((event.cid = udphdr.cid) AND (event.sid = udphdr.sid))
6. 545.363 40,733.671 ↑ 1.0 1,649,246 1

Hash Left Join (cost=107,938.74..295,783.52 rows=1,661,717 width=169) (actual time=9,643.157..40,733.671 rows=1,649,246 loops=1)

  • Hash Cond: (event.signature = signature.sig_id)
7. 534.020 40,184.826 ↑ 1.0 1,649,246 1

Hash Right Join (cost=107,594.87..291,075.67 rows=1,661,717 width=110) (actual time=9,639.632..40,184.826 rows=1,649,246 loops=1)

  • Hash Cond: (event.sid = sensornn.sid)
8. 15,661.499 39,650.744 ↑ 1.0 1,649,225 1

Hash Left Join (cost=107,593.27..268,225.47 rows=1,661,717 width=68) (actual time=9,639.563..39,650.744 rows=1,649,225 loops=1)

  • Hash Cond: ((event.cid = iphdr.cid) AND (event.sid = iphdr.sid))
9. 5,533.384 22,724.841 ↑ 1.0 1,649,225 1

Hash Left Join (cost=16,326.58..126,123.76 rows=1,661,717 width=44) (actual time=2,085.364..22,724.841 rows=1,649,225 loops=1)

  • Hash Cond: ((event.cid = tcphdr.cid) AND (event.sid = tcphdr.sid))
10. 17,013.628 17,013.628 ↑ 1.0 1,649,225 1

Seq Scan on event (cost=0.00..72,841.17 rows=1,661,717 width=36) (actual time=1,907.448..17,013.628 rows=1,649,225 loops=1)

11. 119.638 177.829 ↑ 1.0 386,663 1

Hash (cost=8,260.63..8,260.63 rows=386,663 width=20) (actual time=177.829..177.829 rows=386,663 loops=1)

  • Buckets: 65,536 Batches: 8 Memory Usage: 2,966kB
12. 58.191 58.191 ↑ 1.0 386,663 1

Seq Scan on tcphdr (cost=0.00..8,260.63 rows=386,663 width=20) (actual time=0.013..58.191 rows=386,663 loops=1)

13. 852.072 1,264.404 ↓ 1.0 1,651,372 1

Hash (cost=53,597.28..53,597.28 rows=1,651,228 width=36) (actual time=1,264.403..1,264.404 rows=1,651,372 loops=1)

  • Buckets: 65,536 Batches: 64 Memory Usage: 2,424kB
14. 412.332 412.332 ↓ 1.0 1,651,372 1

Seq Scan on iphdr (cost=0.00..53,597.28 rows=1,651,228 width=36) (actual time=0.011..412.332 rows=1,651,372 loops=1)

15. 0.011 0.062 ↑ 1.0 49 1

Hash (cost=0.98..0.98 rows=49 width=46) (actual time=0.062..0.062 rows=49 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
16. 0.051 0.051 ↑ 1.0 49 1

CTE Scan on sensornn (cost=0.00..0.98 rows=49 width=46) (actual time=0.015..0.051 rows=49 loops=1)

17. 2.045 3.482 ↑ 1.0 9,372 1

Hash (cost=226.72..226.72 rows=9,372 width=59) (actual time=3.482..3.482 rows=9,372 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 999kB
18. 1.437 1.437 ↑ 1.0 9,372 1

Seq Scan on signature (cost=0.00..226.72 rows=9,372 width=59) (actual time=0.011..1.437 rows=9,372 loops=1)

19. 12.257 18.792 ↑ 1.0 46,822 1

Hash (cost=813.22..813.22 rows=46,822 width=20) (actual time=18.792..18.792 rows=46,822 loops=1)

  • Buckets: 65,536 Batches: 1 Memory Usage: 2,890kB
20. 6.535 6.535 ↑ 1.0 46,822 1

Seq Scan on udphdr (cost=0.00..813.22 rows=46,822 width=20) (actual time=0.011..6.535 rows=46,822 loops=1)