explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PcER : CTE Test 1

Settings
# exclusive inclusive rows x rows loops node
1. 1,452.450 112,607.079 ↑ 31.4 52,850 1

GroupAggregate (cost=816,817.20..949,754.56 rows=1,661,717 width=311) (actual time=92,375.346..112,607.079 rows=52,850 loops=1)

  • Group Key: sensornn.dev_id, signature.sig_id, iphdr.ip_src, iphdr.ip_src_name, 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.013..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. 67,089.731 111,154.629 ↑ 1.0 1,649,246 1

Sort (cost=816,814.71..820,969.00 rows=1,661,717 width=201) (actual time=92,375.326..111,154.629 rows=1,649,246 loops=1)

  • Sort Key: sensornn.dev_id, signature.sig_id, iphdr.ip_src, iphdr.ip_src_name, iphdr.ip_dst, sensornn.cl_id
  • Sort Method: external merge Disk: 277,000kB
5. 643.916 44,064.898 ↑ 1.0 1,649,246 1

Hash Left Join (cost=114,291.29..315,697.09 rows=1,661,717 width=201) (actual time=10,290.229..44,064.898 rows=1,649,246 loops=1)

  • Hash Cond: ((event.cid = udphdr.cid) AND (event.sid = udphdr.sid))
6. 561.522 43,403.462 ↑ 1.0 1,649,246 1

Hash Left Join (cost=112,775.74..305,457.52 rows=1,661,717 width=193) (actual time=10,272.632..43,403.462 rows=1,649,246 loops=1)

  • Hash Cond: (event.signature = signature.sig_id)
7. 521.728 42,838.653 ↑ 1.0 1,649,246 1

Hash Right Join (cost=112,431.87..300,749.67 rows=1,661,717 width=134) (actual time=10,269.315..42,838.653 rows=1,649,246 loops=1)

  • Hash Cond: (event.sid = sensornn.sid)
8. 17,426.801 42,316.863 ↑ 1.0 1,649,225 1

Hash Left Join (cost=112,430.27..277,899.47 rows=1,661,717 width=92) (actual time=10,269.245..42,316.863 rows=1,649,225 loops=1)

  • Hash Cond: ((event.cid = iphdr.cid) AND (event.sid = iphdr.sid))
9. 5,894.815 23,255.764 ↑ 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,074.429..23,255.764 rows=1,649,225 loops=1)

  • Hash Cond: ((event.cid = tcphdr.cid) AND (event.sid = tcphdr.sid))
10. 17,183.094 17,183.094 ↑ 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,896.490..17,183.094 rows=1,649,225 loops=1)

11. 119.990 177.855 ↑ 1.0 386,663 1

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

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

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

13. 1,168.181 1,634.298 ↓ 1.0 1,651,372 1

Hash (cost=53,597.28..53,597.28 rows=1,651,228 width=60) (actual time=1,634.298..1,634.298 rows=1,651,372 loops=1)

  • Buckets: 65,536 Batches: 64 Memory Usage: 3,053kB
14. 466.117 466.117 ↓ 1.0 1,651,372 1

Seq Scan on iphdr (cost=0.00..53,597.28 rows=1,651,228 width=60) (actual time=0.010..466.117 rows=1,651,372 loops=1)

15. 0.010 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.052 0.052 ↑ 1.0 49 1

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

17. 1.864 3.287 ↑ 1.0 9,372 1

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

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

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

19. 11.047 17.520 ↑ 1.0 46,822 1

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

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

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