explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NX9m

Settings
# exclusive inclusive rows x rows loops node
1. 3,982.095 14,785.938 ↑ 1.2 5,001,627 1

Hash Join (cost=555,119.98..831,967.84 rows=5,853,848 width=347) (actual time=8,804.671..14,785.938 rows=5,001,627 loops=1)

  • Output: ids_portos.codigo_entidade, eg.codigo_entidade, eg.estado_administrativo, eg.nome, eg.versao, eg.versao_firmware, to_date((eg.data_instalacao)::text, 'dd-MM-yyyy'::text), eg.numero_serie, ieg.tipo_entidade
  • Hash Cond: (ids_portos.codigo_placa = placas.codigo_entidade)
  • Buffers: shared hit=196896
2. 0.000 7,342.043 ↑ 1.0 5,001,627 1

Gather (cost=363,231.07..533,509.57 rows=5,002,144 width=100) (actual time=5,337.697..7,342.043 rows=5,001,627 loops=1)

  • Output: ids_portos.codigo_entidade, ids_portos.id_externo, ids_portos.tipo_entidade, ids_portos.object_id, ids_portos.codigo_placa, portos.estado_administrativo, portos.nome_porto, portos.descricao, recursos
  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=139212
3. 990.439 7,794.052 ↑ 1.3 1,667,209 3

Hash Join (cost=362,731.07..482,988.13 rows=2,084,227 width=100) (actual time=5,716.217..7,794.052 rows=1,667,209 loops=3)

  • Output: ids_portos.codigo_entidade, ids_portos.id_externo, ids_portos.tipo_entidade, ids_portos.object_id, ids_portos.codigo_placa, portos.estado_administrativo, portos.nome_porto, portos.descricao, re
  • Inner Unique: true
  • Hash Cond: (portos.codigo_entidade = ids_portos.codigo_entidade)
  • Buffers: shared hit=458919
  • Worker 0: actual time=5950.920..8874.187 rows=2361236 loops=1
  • Buffers: shared hit=159615
  • Worker 1: actual time=5860.520..8855.516 rows=2423318 loops=1
  • Buffers: shared hit=160092
4. 962.999 3,553.601 ↑ 1.3 1,667,209 3

Hash Join (cost=171,187.24..265,130.94 rows=2,084,227 width=29) (actual time=2,408.132..3,553.601 rows=1,667,209 loops=3)

  • Output: portos.estado_administrativo, portos.nome_porto, portos.descricao, portos.codigo_entidade, recursos_portos.tipo_interface, recursos_portos.codigo_entidade
  • Inner Unique: true
  • Hash Cond: (portos.codigo_entidade = recursos_portos.codigo_entidade)
  • Buffers: shared hit=221828
  • Worker 0: actual time=2482.988..4087.670 rows=2361236 loops=1
  • Buffers: shared hit=80557
  • Worker 1: actual time=2486.346..4148.304 rows=2423318 loops=1
  • Buffers: shared hit=81034
5. 220.631 220.631 ↑ 1.3 1,667,209 3

Parallel Seq Scan on agorangmanager.portos (cost=0.00..67,140.93 rows=2,122,992 width=19) (actual time=0.006..220.631 rows=1,667,209 loops=3)

  • Output: portos.codigo_entidade, portos.nome_porto, portos.estado_administrativo, portos.id_dominio_sca, portos.descricao
  • Buffers: shared hit=45911
  • Worker 0: actual time=0.005..316.109 rows=2361236 loops=1
  • Buffers: shared hit=21918
  • Worker 1: actual time=0.008..323.423 rows=2423318 loops=1
  • Buffers: shared hit=22395
6. 1,484.601 2,369.971 ↑ 1.0 5,001,627 3

Hash (cost=108,660.44..108,660.44 rows=5,002,144 width=10) (actual time=2,369.971..2,369.971 rows=5,001,627 loops=3)

  • Output: recursos_portos.tipo_interface, recursos_portos.codigo_entidade
  • Buckets: 8388608 Batches: 1 Memory Usage: 299988kB
  • Buffers: shared hit=175917
  • Worker 0: actual time=2445.267..2445.267 rows=5001627 loops=1
  • Buffers: shared hit=58639
  • Worker 1: actual time=2448.035..2448.035 rows=5001627 loops=1
  • Buffers: shared hit=58639
7. 885.370 885.370 ↑ 1.0 5,001,627 3

Seq Scan on agorangmanager.recursos_portos (cost=0.00..108,660.44 rows=5,002,144 width=10) (actual time=0.034..885.370 rows=5,001,627 loops=3)

  • Output: recursos_portos.tipo_interface, recursos_portos.codigo_entidade
  • Buffers: shared hit=175917
  • Worker 0: actual time=0.047..963.022 rows=5001627 loops=1
  • Buffers: shared hit=58639
  • Worker 1: actual time=0.045..960.541 rows=5001627 loops=1
  • Buffers: shared hit=58639
8. 2,078.408 3,250.012 ↑ 1.0 5,001,628 3

Hash (cost=129,005.59..129,005.59 rows=5,003,059 width=87) (actual time=3,250.012..3,250.012 rows=5,001,628 loops=3)

  • Output: ids_portos.codigo_entidade, ids_portos.id_externo, ids_portos.tipo_entidade, ids_portos.object_id, ids_portos.codigo_placa
  • Buckets: 8388608 Batches: 1 Memory Usage: 674509kB
  • Buffers: shared hit=236925
  • Worker 0: actual time=3406.035..3406.035 rows=5001628 loops=1
  • Buffers: shared hit=78975
  • Worker 1: actual time=3332.787..3332.787 rows=5001628 loops=1
  • Buffers: shared hit=78975
9. 1,171.604 1,171.604 ↑ 1.0 5,001,628 3

Seq Scan on agorangmanager.ids_portos (cost=0.00..129,005.59 rows=5,003,059 width=87) (actual time=0.045..1,171.604 rows=5,001,628 loops=3)

  • Output: ids_portos.codigo_entidade, ids_portos.id_externo, ids_portos.tipo_entidade, ids_portos.object_id, ids_portos.codigo_placa
  • Buffers: shared hit=236925
  • Worker 0: actual time=0.057..1297.005 rows=5001628 loops=1
  • Buffers: shared hit=78975
  • Worker 1: actual time=0.063..1269.121 rows=5001628 loops=1
  • Buffers: shared hit=78975
10. 670.429 3,461.800 ↑ 1.2 845,442 1

Hash (cost=179,520.41..179,520.41 rows=989,480 width=262) (actual time=3,461.800..3,461.800 rows=845,442 loops=1)

  • Output: eg.codigo_entidade, eg.estado_administrativo, eg.nome, eg.versao, eg.versao_firmware, eg.data_instalacao, eg.numero_serie, eg.id_dominio_gerido, eg.id_area_central, eg.bastidor, eg.sub_bastidor, eg.p
  • Buckets: 1048576 Batches: 1 Memory Usage: 266584kB
  • Buffers: shared hit=57684
11. 0.000 2,791.371 ↑ 1.2 845,442 1

Gather (cost=134,986.38..179,520.41 rows=989,480 width=262) (actual time=1,908.139..2,791.371 rows=845,442 loops=1)

  • Output: eg.codigo_entidade, eg.estado_administrativo, eg.nome, eg.versao, eg.versao_firmware, eg.data_instalacao, eg.numero_serie, eg.id_dominio_gerido, eg.id_area_central, eg.bastidor, eg.sub_bastidor
  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=57684
12. 183.960 2,906.051 ↑ 1.5 281,814 3

Hash Join (cost=134,486.38..169,125.61 rows=412,283 width=262) (actual time=2,129.172..2,906.051 rows=281,814 loops=3)

  • Output: eg.codigo_entidade, eg.estado_administrativo, eg.nome, eg.versao, eg.versao_firmware, eg.data_instalacao, eg.numero_serie, eg.id_dominio_gerido, eg.id_area_central, eg.bastidor, eg.sub_ba
  • Inner Unique: true
  • Hash Cond: (eg.codigo_entidade = ieg.codigo_entidade)
  • Buffers: shared hit=179173
  • Worker 0: actual time=2340.721..3212.095 rows=318813 loops=1
  • Buffers: shared hit=60228
  • Worker 1: actual time=2139.378..3177.202 rows=386498 loops=1
  • Buffers: shared hit=61261
13. 173.069 2,267.586 ↑ 1.3 281,814 3

Hash Left Join (cost=103,961.25..134,152.99 rows=352,277 width=238) (actual time=1,669.143..2,267.586 rows=281,814 loops=3)

  • Output: eg.codigo_entidade, eg.estado_administrativo, eg.nome, eg.versao, eg.versao_firmware, eg.data_instalacao, eg.numero_serie, eg.id_dominio_gerido, eg.id_area_central, eg.bastidor, eg.
  • Inner Unique: true
  • Hash Cond: (eg.codigo_entidade = dei.codigo_entidade)
  • Buffers: shared hit=144432
  • Worker 0: actual time=1861.526..2533.194 rows=318813 loops=1
  • Buffers: shared hit=48620
  • Worker 1: actual time=1660.226..2460.638 rows=386498 loops=1
  • Buffers: shared hit=49653
14. 221.709 1,667.032 ↑ 1.3 281,814 3

Hash Join (cost=76,825.53..102,569.78 rows=352,277 width=215) (actual time=1,236.007..1,667.032 rows=281,814 loops=3)

  • Output: eg.codigo_entidade, eg.estado_administrativo, eg.nome, eg.versao, eg.versao_firmware, eg.data_instalacao, eg.numero_serie, eg.id_dominio_gerido, eg.id_area_central, eg.bastido
  • Inner Unique: true
  • Hash Cond: (idp.codigo_elem_gerido = eg.codigo_entidade)
  • Buffers: shared hit=120024
  • Worker 0: actual time=1391.298..1877.793 rows=318813 loops=1
  • Buffers: shared hit=40484
  • Worker 1: actual time=1230.114..1809.550 rows=386498 loops=1
  • Buffers: shared hit=41517
15. 159.566 617.000 ↑ 1.3 281,814 3

Hash Join (cost=26,270.94..47,567.69 rows=352,277 width=94) (actual time=402.224..617.000 rows=281,814 loops=3)

  • Output: idp.codigo_entidade, idp.id_externo, idp.tipo_entidade, idp.object_id, idp.codigo_elem_gerido, placas.versao_firmware, placas.estado_administrativo, placas.codigo_entida
  • Inner Unique: true
  • Hash Cond: (idp.codigo_entidade = placas.codigo_entidade)
  • Buffers: shared hit=35070
  • Worker 0: actual time=424.504..668.966 rows=318813 loops=1
  • Buffers: shared hit=12166
  • Worker 1: actual time=413.918..703.669 rows=386498 loops=1
  • Buffers: shared hit=13199
16. 60.268 60.268 ↑ 1.3 281,814 3

Parallel Seq Scan on agorangmanager.ids_placas idp (cost=0.00..16,848.98 rows=352,298 width=83) (actual time=0.016..60.268 rows=281,814 loops=3)

  • Output: idp.codigo_entidade, idp.tipo_entidade, idp.object_id, idp.codigo_elem_gerido, idp.id_externo
  • Buffers: shared hit=13326
  • Worker 0: actual time=0.023..72.790 rows=318813 loops=1
  • Buffers: shared hit=4918
  • Worker 1: actual time=0.021..84.936 rows=386498 loops=1
  • Buffers: shared hit=5951
17. 241.612 397.166 ↑ 1.0 845,442 3

Hash (cost=15,702.64..15,702.64 rows=845,464 width=11) (actual time=397.166..397.166 rows=845,442 loops=3)

  • Output: placas.versao_firmware, placas.estado_administrativo, placas.codigo_entidade
  • Buckets: 1048576 Batches: 1 Memory Usage: 47837kB
  • Buffers: shared hit=21744
  • Worker 0: actual time=418.964..418.964 rows=845442 loops=1
  • Buffers: shared hit=7248
  • Worker 1: actual time=408.624..408.624 rows=845442 loops=1
  • Buffers: shared hit=7248
18. 155.554 155.554 ↑ 1.0 845,442 3

Seq Scan on agorangmanager.placas (cost=0.00..15,702.64 rows=845,464 width=11) (actual time=0.039..155.554 rows=845,442 loops=3)

  • Output: placas.versao_firmware, placas.estado_administrativo, placas.codigo_entidade
  • Buffers: shared hit=21744
  • Worker 0: actual time=0.047..167.088 rows=845442 loops=1
  • Buffers: shared hit=7248
  • Worker 1: actual time=0.057..162.520 rows=845442 loops=1
  • Buffers: shared hit=7248
19. 472.065 828.323 ↑ 1.2 844,424 3

Hash (cost=38,200.93..38,200.93 rows=988,293 width=121) (actual time=828.323..828.323 rows=844,424 loops=3)

  • Output: eg.codigo_entidade, eg.estado_administrativo, eg.nome, eg.versao, eg.versao_firmware, eg.data_instalacao, eg.numero_serie, eg.id_dominio_gerido, eg.id_area_central, eg.b
  • Buckets: 1048576 Batches: 1 Memory Usage: 137740kB
  • Buffers: shared hit=84954
  • Worker 0: actual time=960.919..960.919 rows=844424 loops=1
  • Buffers: shared hit=28318
  • Worker 1: actual time=810.957..810.957 rows=844424 loops=1
  • Buffers: shared hit=28318
20. 356.258 356.258 ↑ 1.2 844,424 3

Seq Scan on agorangmanager.elementos_geridos eg (cost=0.00..38,200.93 rows=988,293 width=121) (actual time=0.037..356.258 rows=844,424 loops=3)

  • Output: eg.codigo_entidade, eg.estado_administrativo, eg.nome, eg.versao, eg.versao_firmware, eg.data_instalacao, eg.numero_serie, eg.id_dominio_gerido, eg.id_area_central
  • Buffers: shared hit=84954
  • Worker 0: actual time=0.050..431.320 rows=844424 loops=1
  • Buffers: shared hit=28318
  • Worker 1: actual time=0.048..360.674 rows=844424 loops=1
  • Buffers: shared hit=28318
21. 270.103 427.485 ↑ 1.0 844,370 3

Hash (cost=16,580.32..16,580.32 rows=844,432 width=31) (actual time=427.485..427.485 rows=844,370 loops=3)

  • Output: dei.caminho, dei.end_multiponto, dei.codigo_entidade
  • Buckets: 1048576 Batches: 1 Memory Usage: 61330kB
  • Buffers: shared hit=24408
  • Worker 0: actual time=463.839..463.839 rows=844370 loops=1
  • Buffers: shared hit=8136
  • Worker 1: actual time=424.837..424.837 rows=844370 loops=1
  • Buffers: shared hit=8136
22. 157.382 157.382 ↑ 1.0 844,370 3

Seq Scan on agorangmanager.dados_equip_inserido dei (cost=0.00..16,580.32 rows=844,432 width=31) (actual time=0.040..157.382 rows=844,370 loops=3)

  • Output: dei.caminho, dei.end_multiponto, dei.codigo_entidade
  • Buffers: shared hit=24408
  • Worker 0: actual time=0.059..180.747 rows=844370 loops=1
  • Buffers: shared hit=8136
  • Worker 1: actual time=0.048..157.735 rows=844370 loops=1
  • Buffers: shared hit=8136
23. 274.916 454.505 ↑ 1.0 844,425 3

Hash (cost=19,969.50..19,969.50 rows=844,450 width=40) (actual time=454.505..454.505 rows=844,425 loops=3)

  • Output: ieg.tipo_entidade, ieg.object_id, ieg.manager_code, ieg.codigo_entidade
  • Buckets: 1048576 Batches: 1 Memory Usage: 71245kB
  • Buffers: shared hit=34575
  • Worker 0: actual time=473.558..473.558 rows=844425 loops=1
  • Buffers: shared hit=11525
  • Worker 1: actual time=473.532..473.532 rows=844425 loops=1
  • Buffers: shared hit=11525
24. 179.589 179.589 ↑ 1.0 844,425 3

Seq Scan on agorangmanager.ids_elementos_geridos ieg (cost=0.00..19,969.50 rows=844,450 width=40) (actual time=0.035..179.589 rows=844,425 loops=3)

  • Output: ieg.tipo_entidade, ieg.object_id, ieg.manager_code, ieg.codigo_entidade
  • Buffers: shared hit=34575
  • Worker 0: actual time=0.043..193.779 rows=844425 loops=1
  • Buffers: shared hit=11525
  • Worker 1: actual time=0.049..192.157 rows=844425 loops=1
  • Buffers: shared hit=11525
Planning time : 4.615 ms
Execution time : 15,237.725 ms