explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RRgb

Settings
# exclusive inclusive rows x rows loops node
1. 0.036 15,258.371 ↓ 2.0 2 1

Sort (cost=435,258.08..435,258.08 rows=1 width=114) (actual time=15,258.371..15,258.371 rows=2 loops=1)

  • Sort Key: "QVveiViagemVeiculo".vvei_precedencia
  • Sort Method: quicksort Memory: 25kB
2. 0.006 15,258.335 ↓ 2.0 2 1

Nested Loop (cost=141,145.89..435,258.07 rows=1 width=114) (actual time=15,118.392..15,258.335 rows=2 loops=1)

3. 0.006 15,258.303 ↓ 2.0 2 1

Nested Loop (cost=141,145.75..435,257.91 rows=1 width=109) (actual time=15,118.362..15,258.303 rows=2 loops=1)

4. 0.000 15,258.279 ↓ 2.0 2 1

Nested Loop (cost=141,145.46..435,257.60 rows=1 width=96) (actual time=15,118.341..15,258.279 rows=2 loops=1)

5. 45.432 15,302.289 ↓ 2.0 2 1

Gather (cost=141,145.32..435,257.43 rows=1 width=90) (actual time=15,118.284..15,302.289 rows=2 loops=1)

  • Workers Planned: 1
  • Workers Launched: 0
6. 1,030.051 15,256.857 ↓ 2.0 2 1

Hash Join (cost=140,145.32..434,257.33 rows=1 width=90) (actual time=15,116.926..15,256.857 rows=2 loops=1)

  • Hash Cond: ("QVveiViagemVeiculo".vvei_viag_codigo = "QViagViagem".viag_codigo)
7. 7,546.235 14,226.784 ↓ 1.6 11,524,094 1

Parallel Hash Join (cost=140,142.53..415,833.89 rows=7,017,387 width=94) (actual time=3,444.552..14,226.784 rows=11,524,094 loops=1)

  • Hash Cond: ("QVveiViagemVeiculo".vvei_veic_oras_codigo = "QVeicVeiculo".veic_oras_codigo)
8. 3,244.181 3,244.181 ↓ 1.7 11,925,424 1

Parallel Seq Scan on vvei_viagem_veiculo "QVveiViagemVeiculo" (cost=0.00..210,396.26 rows=7,017,387 width=10) (actual time=0.009..3,244.181 rows=11,925,424 loops=1)

  • Filter: ((vvei_ativo)::text = 'S'::text)
  • Rows Removed by Filter: 576
9. 436.479 3,436.368 ↓ 1.7 597,207 1

Parallel Hash (cost=135,622.14..135,622.14 rows=361,631 width=96) (actual time=3,436.368..3,436.368 rows=597,207 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 84096kB
10. 229.844 2,999.889 ↓ 1.7 597,207 1

Hash Join (cost=37,811.51..135,622.14 rows=361,631 width=96) (actual time=961.511..2,999.889 rows=597,207 loops=1)

  • Hash Cond: ("QTermTerminal".term_vtec_codigo = "QVtecVersaoTecnologia".vtec_codigo)
11. 213.058 2,769.661 ↓ 1.7 597,207 1

Hash Join (cost=37,384.07..134,236.94 rows=361,631 width=86) (actual time=961.093..2,769.661 rows=597,207 loops=1)

  • Hash Cond: ("QMvecModeloVeiculo".mvec_mvei_codigo = "QMveiMarcaVeiculo".mvei_codigo)
12. 230.127 2,556.536 ↓ 1.7 597,583 1

Hash Join (cost=37,378.54..133,256.93 rows=361,631 width=82) (actual time=961.003..2,556.536 rows=597,583 loops=1)

  • Hash Cond: ("QVeicVeiculo".veic_mvec_codigo = "QMvecModeloVeiculo".mvec_codigo)
13. 204.804 2,325.527 ↓ 1.7 614,696 1

Hash Join (cost=37,291.69..132,219.33 rows=361,631 width=71) (actual time=960.101..2,325.527 rows=614,696 loops=1)

  • Hash Cond: ("QVeicVeiculo".veic_tvei_codigo = "QTveiTipoVeiculo".tvei_codigo)
14. 450.069 2,120.705 ↓ 1.7 614,743 1

Parallel Hash Join (cost=37,290.33..131,017.24 rows=361,631 width=63) (actual time=960.071..2,120.705 rows=614,743 loops=1)

  • Hash Cond: ("QOrteObjetoRastreadoTermina".orte_oras_codigo = "QVeicVeiculo".veic_oras_codigo)
15. 509.428 1,028.760 ↓ 1.7 614,760 1

Parallel Hash Join (cost=15,519.77..108,297.39 rows=361,631 width=8) (actual time=309.707..1,028.760 rows=614,760 loops=1)

  • Hash Cond: ("QTermTerminal".term_codigo = "QOrteObjetoRastreadoTermina".orte_term_codigo)
16. 215.425 215.425 ↓ 1.7 989,588 1

Parallel Seq Scan on term_terminal "QTermTerminal" (cost=0.00..91,241.78 rows=585,078 width=8) (actual time=0.004..215.425 rows=989,588 loops=1)

17. 303.907 303.907 ↓ 1.7 614,767 1

Parallel Hash (cost=10,999.38..10,999.38 rows=361,631 width=8) (actual time=303.907..303.907 rows=614,767 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 32256kB
  • -> Parallel Seq Scan on orte_objeto_rastreado_termina "QOrteObjetoRastreadoTermina" (cost=0.00..10999.38 rows=361631 width=8) (actual time=0.021.
  • Filter: ((orte_sequencia)::text = 'P'::text)
  • Rows Removed by Filter: 21
18. 340.243 641.876 ↓ 1.7 651,038 1

Parallel Hash (cost=16,983.58..16,983.58 rows=382,958 width=55) (actual time=641.876..641.876 rows=651,038 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 66176kB
19. 301.633 301.633 ↓ 1.7 651,038 1

Parallel Seq Scan on veic_veiculo "QVeicVeiculo" (cost=0.00..16,983.58 rows=382,958 width=55) (actual time=0.017..301.633 rows=651,038 loops=1)

20. 0.009 0.018 ↑ 1.0 16 1

Hash (cost=1.16..1.16 rows=16 width=12) (actual time=0.018..0.018 rows=16 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
21. 0.009 0.009 ↑ 1.0 16 1

Seq Scan on tvei_tipo_veiculo "QTveiTipoVeiculo" (cost=0.00..1.16 rows=16 width=12) (actual time=0.007..0.009 rows=16 loops=1)

22. 0.452 0.882 ↑ 1.0 2,660 1

Hash (cost=53.60..53.60 rows=2,660 width=19) (actual time=0.881..0.882 rows=2,660 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 169kB
23. 0.430 0.430 ↑ 1.0 2,660 1

Seq Scan on mvec_modelo_veiculo "QMvecModeloVeiculo" (cost=0.00..53.60 rows=2,660 width=19) (actual time=0.007..0.430 rows=2,660 loops=1)

24. 0.026 0.067 ↑ 1.0 157 1

Hash (cost=3.57..3.57 rows=157 width=12) (actual time=0.067..0.067 rows=157 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
25. 0.041 0.041 ↑ 1.0 157 1

Seq Scan on mvei_marca_veiculo "QMveiMarcaVeiculo" (cost=0.00..3.57 rows=157 width=12) (actual time=0.016..0.041 rows=157 loops=1)

26. 0.384 0.384 ↑ 1.0 474 1

Hash (cost=421.51..421.51 rows=474 width=18) (actual time=0.384..0.384 rows=474 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 33kB
  • -> Index Scan using vtec_versao_tecnologia__tecnologia__versao__idx on vtec_versao_tecnologia "QVtecVersaoTecnologia" (cost=0.27..421.51 rows=474 width=18) (actual time=0.032.
27. 0.004 0.022 ↑ 1.0 1 1

Hash (cost=2.78..2.78 rows=1 width=4) (actual time=0.022..0.022 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
28. 0.018 0.018 ↑ 1.0 1 1

Index Scan using viag_viagem_idx_70499 on viag_viagem "QViagViagem" (cost=0.56..2.78 rows=1 width=4) (actual time=0.016..0.018 rows=1 loops=1)

  • Index Cond: (viag_codigo_sm = 22207133)
29. 0.050 0.050 ↑ 1.0 1 2

Index Scan using tecn_tecnologia_pkey on tecn_tecnologia "QTecnTecnologia" (cost=0.14..0.17 rows=1 width=14) (actual time=0.025..0.025 rows=1 loops=2)

  • Index Cond: (tecn_codigo = "QVtecVersaoTecnologia".vtec_tecn_codigo)
30. 0.018 0.018 ↑ 1.0 1 2

Index Scan using cida_cidade_pkey on cida_cidade "QCidaCidade" (cost=0.29..0.31 rows=1 width=21) (actual time=0.009..0.009 rows=1 loops=2)

  • Index Cond: (cida_codigo = "QVeicVeiculo".veic_cida_codigo_emplacamento)
31. 0.026 0.026 ↑ 1.0 1 2

Index Scan using esta_estado_pkey on esta_estado "QEstaEstado" (cost=0.14..0.16 rows=1 width=11) (actual time=0.013..0.013 rows=1 loops=2)

  • Index Cond: (esta_codigo = "QCidaCidade".cida_esta_codigo)
Planning time : 5.917 ms
Execution time : 15,302.648 ms