explain.depesz.com

PostgreSQL's explain analyze made readable

Result: w1Eh

Settings
# exclusive inclusive rows x rows loops node
1. 0.022 15,195.292 ↓ 2.0 2 1

Sort (cost=435,160.85..435,160.86 rows=1 width=113) (actual time=15,195.292..15,195.292 rows=2 loops=1)

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

Nested Loop (cost=141,084.31..435,160.84 rows=1 width=113) (actual time=15,054.828..15,195.270 rows=2 loops=1)

3. 0.005 15,195.257 ↓ 2.0 2 1

Nested Loop (cost=141,084.17..435,160.68 rows=1 width=108) (actual time=15,054.818..15,195.257 rows=2 loops=1)

4. 0.000 15,195.240 ↓ 2.0 2 1

Nested Loop (cost=141,083.88..435,160.37 rows=1 width=96) (actual time=15,054.804..15,195.240 rows=2 loops=1)

5. 45.728 15,239.577 ↓ 2.0 2 1

Gather (cost=141,083.74..435,160.20 rows=1 width=90) (actual time=15,054.763..15,239.577 rows=2 loops=1)

  • Workers Planned: 1
  • Workers Launched: 0
6. 1,037.389 15,193.849 ↓ 2.0 2 1

Hash Join (cost=140,083.74..434,160.10 rows=1 width=90) (actual time=15,053.419..15,193.849 rows=2 loops=1)

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

Parallel Hash Join (cost=140,080.95..415,741.25 rows=7,015,640 width=94) (actual time=3,441.922..14,156.439 rows=11,524,094 loops=1)

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

Parallel Seq Scan on vvei_viagem_veiculo "QVveiViagemVeiculo" (cost=0.00..210,380.20 rows=7,015,868 width=10) (actual time=0.009..3,194.887 rows=11,925,424 loops=1)

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

Parallel Hash (cost=135,560.60..135,560.60 rows=361,628 width=96) (actual time=3,433.997..3,433.997 rows=597,207 loops=1)

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

Hash Join (cost=37,811.72..135,560.60 rows=361,628 width=96) (actual time=963.472..2,992.562 rows=597,207 loops=1)

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

Hash Join (cost=37,384.28..134,175.40 rows=361,628 width=86) (actual time=963.109..2,766.532 rows=597,207 loops=1)

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

Hash Join (cost=37,378.75..133,195.39 rows=361,628 width=82) (actual time=963.029..2,558.384 rows=597,583 loops=1)

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

Hash Join (cost=37,291.90..132,157.80 rows=361,628 width=71) (actual time=962.128..2,339.491 rows=614,696 loops=1)

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

Parallel Hash Join (cost=37,290.54..130,955.75 rows=361,628 width=63) (actual time=962.103..2,134.726 rows=614,743 loops=1)

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

Parallel Hash Join (cost=15,519.85..108,235.78 rows=361,628 width=8) (actual time=309.912..1,046.057 rows=614,760 loops=1)

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

Parallel Seq Scan on term_terminal "QTermTerminal" (cost=0.00..91,192.92 rows=580,192 width=8) (actual time=0.003..221.985 rows=989,588 loops=1)

17. 167.946 304.105 ↓ 1.7 614,767 1

Parallel Hash (cost=10,999.50..10,999.50 rows=361,628 width=8) (actual time=304.104..304.105 rows=614,767 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 32256kB
18. 136.159 136.159 ↓ 1.7 614,767 1

Parallel Seq Scan on orte_objeto_rastreado_termina "QOrteObjetoRastreadoTermina" (cost=0.00..10,999.50 rows=361,628 width=8) (actual time=0.021..136.159 rows=614,767 loops=1)

  • Filter: ((orte_sequencia)::text = 'P'::text)
  • Rows Removed by Filter: 21
19. 339.989 644.346 ↓ 1.7 651,038 1

Parallel Hash (cost=16,983.64..16,983.64 rows=382,964 width=55) (actual time=644.346..644.346 rows=651,038 loops=1)

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

Parallel Seq Scan on veic_veiculo "QVeicVeiculo" (cost=0.00..16,983.64 rows=382,964 width=55) (actual time=0.019..304.357 rows=651,038 loops=1)

21. 0.005 0.013 ↑ 1.0 16 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
22. 0.008 0.008 ↑ 1.0 16 1

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

23. 0.459 0.881 ↑ 1.0 2,660 1

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

  • Buckets: 4096 Batches: 1 Memory Usage: 169kB
24. 0.422 0.422 ↑ 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.422 rows=2,660 loops=1)

25. 0.028 0.068 ↑ 1.0 157 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
26. 0.040 0.040 ↑ 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.040 rows=157 loops=1)

27. 0.088 0.339 ↑ 1.0 474 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 33kB
28. 0.251 0.251 ↑ 1.0 474 1

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.033..0.251 rows=474 loops=1)

29. 0.005 0.021 ↑ 1.0 1 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
30. 0.016 0.016 ↑ 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.015..0.016 rows=1 loops=1)

  • Index Cond: (viag_codigo_sm = 22207133)
31. 0.034 0.034 ↑ 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.017..0.017 rows=1 loops=2)

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

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

  • Index Cond: (cida_codigo = "QVeicVeiculo".veic_cida_codigo_emplacamento)
33. 0.006 0.006 ↑ 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.003..0.003 rows=1 loops=2)

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