explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uHUQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.019 0.666 ↑ 1.5 6 1

Hash Join (cost=52.73..334.77 rows=9 width=302) (actual time=0.498..0.666 rows=6 loops=1)

  • Hash Cond: ("Ras.Det.Ocorrencia".fk_situacao_remessa = "Ras.Det.Ocorrencia.SituacaoRemessa".codigo)
2. 0.015 0.624 ↑ 1.5 6 1

Hash Join (cost=50.96..332.98 rows=9 width=269) (actual time=0.459..0.624 rows=6 loops=1)

  • Hash Cond: ("Ras.Det".fk_ocorrencia = "Ras.Det.Ocorrencia.ConfigRetornoCliente".fk_ocorrencia)
3. 0.017 0.546 ↑ 2.0 9 1

Hash Join (cost=30.49..312.46 rows=18 width=243) (actual time=0.386..0.546 rows=9 loops=1)

  • Hash Cond: ("Ras.Det".fk_ocorrencia = "Ras.Det.Ocorrencia".codigo)
4. 0.008 0.440 ↑ 2.0 9 1

Nested Loop (cost=24.45..306.38 rows=18 width=202) (actual time=0.285..0.440 rows=9 loops=1)

5. 0.016 0.405 ↑ 2.0 9 1

Hash Join (cost=24.17..209.12 rows=18 width=191) (actual time=0.273..0.405 rows=9 loops=1)

  • Hash Cond: ("Ras.Det".fk_local_lancamento = "Ras.Det.LocalLancamento".codigo)
6. 0.010 0.223 ↑ 2.0 9 1

Nested Loop Left Join (cost=7.05..191.96 rows=18 width=180) (actual time=0.095..0.223 rows=9 loops=1)

7. 0.013 0.132 ↑ 2.0 9 1

Nested Loop (cost=1.70..161.32 rows=18 width=134) (actual time=0.064..0.132 rows=9 loops=1)

8. 0.007 0.065 ↑ 2.0 9 1

Nested Loop (cost=1.13..60.16 rows=18 width=110) (actual time=0.050..0.065 rows=9 loops=1)

9. 0.025 0.025 ↑ 2.0 1 1

Index Scan using idx_pedido on "Remessa" (cost=0.56..15.18 rows=2 width=94) (actual time=0.024..0.025 rows=1 loops=1)

  • Index Cond: ((pedido)::text = 'NUB04767325BR'::text)
  • Filter: (fk_servico = 7)
10. 0.033 0.033 ↑ 2.7 9 1

Index Scan using idx_fk_remessa_rastreamento on "Rastreamento" "Ras" (cost=0.57..22.25 rows=24 width=28) (actual time=0.022..0.033 rows=9 loops=1)

  • Index Cond: ((fk_remessa)::text = ("Remessa".codigo)::text)
11. 0.054 0.054 ↑ 1.0 1 9

Index Scan using "RastreamentoDetalhamento_pkey" on "RastreamentoDetalhamento" "Ras.Det" (cost=0.57..5.62 rows=1 width=32) (actual time=0.006..0.006 rows=1 loops=9)

  • Index Cond: (codigo = "Ras".fk_detalhamento)
12. 0.036 0.081 ↓ 0.0 0 9

Hash Right Join (cost=5.35..6.74 rows=1 width=54) (actual time=0.009..0.009 rows=0 loops=9)

  • Hash Cond: ("Ras.Det.Baixa.GrauRelacionamento".codigo = "Ras.Det.Baixa".fk_grau_relacionamento)
13. 0.000 0.000 ↓ 0.0 0

Seq Scan on "GrauRelacionamento" "Ras.Det.Baixa.GrauRelacionamento" (cost=0.00..1.28 rows=28 width=13) (never executed)

14. 0.009 0.045 ↓ 0.0 0 9

Hash (cost=5.34..5.34 rows=1 width=45) (actual time=0.005..0.005 rows=0 loops=9)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
15. 0.036 0.036 ↓ 0.0 0 9

Index Scan using "DetalhamentoBaixa_fk_rast_baixa_idx" on "DetalhamentoBaixa" "Ras.Det.Baixa" (cost=0.43..5.34 rows=1 width=45) (actual time=0.004..0.004 rows=0 loops=9)

  • Index Cond: ("Ras.Det".codigo = fk_rast_baixa)
16. 0.057 0.166 ↑ 1.0 272 1

Hash (cost=13.72..13.72 rows=272 width=15) (actual time=0.166..0.166 rows=272 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
17. 0.109 0.109 ↑ 1.0 272 1

Seq Scan on "Courier" "Ras.Det.LocalLancamento" (cost=0.00..13.72 rows=272 width=15) (actual time=0.004..0.109 rows=272 loops=1)

18. 0.027 0.027 ↑ 1.0 1 9

Index Scan using "Fornecedor_pkey" on "Fornecedor" "Ras.Det.LocalLancamento.Fornecedor" (cost=0.28..5.40 rows=1 width=15) (actual time=0.003..0.003 rows=1 loops=9)

  • Index Cond: (codigo = "Ras.Det.LocalLancamento".fk_fornecedor)
19. 0.036 0.089 ↑ 1.0 135 1

Hash (cost=4.35..4.35 rows=135 width=41) (actual time=0.089..0.089 rows=135 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 18kB
20. 0.053 0.053 ↑ 1.0 135 1

Seq Scan on "Ocorrencia" "Ras.Det.Ocorrencia" (cost=0.00..4.35 rows=135 width=41) (actual time=0.004..0.053 rows=135 loops=1)

21. 0.022 0.063 ↑ 1.0 67 1

Hash (cost=19.63..19.63 rows=67 width=34) (actual time=0.063..0.063 rows=67 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
22. 0.024 0.041 ↑ 1.0 67 1

Bitmap Heap Scan on "ConfigRetornoCliente" "Ras.Det.Ocorrencia.ConfigRetornoCliente" (cost=4.80..19.63 rows=67 width=34) (actual time=0.026..0.041 rows=67 loops=1)

  • Recheck Cond: (fk_servico = 7)
  • Heap Blocks: exact=2
23. 0.017 0.017 ↑ 1.0 67 1

Bitmap Index Scan on "ConfigRetornoCliente_fk_servico_fk_ocorrencia_key" (cost=0.00..4.78 rows=67 width=0) (actual time=0.017..0.017 rows=67 loops=1)

  • Index Cond: (fk_servico = 7)
24. 0.012 0.023 ↑ 1.0 34 1

Hash (cost=1.34..1.34 rows=34 width=21) (actual time=0.023..0.023 rows=34 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
25. 0.011 0.011 ↑ 1.0 34 1

Seq Scan on "SituacaoRemessa" "Ras.Det.Ocorrencia.SituacaoRemessa" (cost=0.00..1.34 rows=34 width=21) (actual time=0.005..0.011 rows=34 loops=1)

Planning time : 4.265 ms