explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4X3s

Settings
# exclusive inclusive rows x rows loops node
1. 24.269 191,553.632 ↑ 2.1 12,136 1

Sort (cost=3,469,403.82..3,469,466.79 rows=25,187 width=794) (actual time=191,552.090..191,553.632 rows=12,136 loops=1)

  • Sort Key: rd.dt_inicio_terminal
  • Sort Method: quicksort Memory: 4,334kB
2. 175,329.701 191,529.363 ↑ 2.1 12,136 1

GroupAggregate (cost=874,687.58..3,467,562.60 rows=25,187 width=794) (actual time=13,095.857..191,529.363 rows=12,136 loops=1)

  • Group Key: mc.nm_modelo, ve.cd_identificador, rd.id_rd, tb_sos.qtd_sos, tb_sos.tempo_total_sos, tb_refeicao.qtd_refeicao, tb_refeicao.tempo_total_refeicao
3. 6,024.327 14,678.428 ↓ 67.8 1,706,753 1

Sort (cost=874,687.58..874,750.54 rows=25,187 width=632) (actual time=13,095.063..14,678.428 rows=1,706,753 loops=1)

  • Sort Key: mc.nm_modelo, ve.cd_identificador, rd.id_rd, tb_sos.qtd_sos, tb_sos.tempo_total_sos, tb_refeicao.qtd_refeicao, tb_refeicao.tempo_total_refeicao
  • Sort Method: external merge Disk: 697,928kB
4. 381.775 8,654.101 ↓ 67.8 1,706,753 1

Nested Loop (cost=146,431.90..872,846.36 rows=25,187 width=632) (actual time=1,741.131..8,654.101 rows=1,706,753 loops=1)

5. 512.023 4,436.628 ↓ 52.5 639,283 1

Nested Loop (cost=146,431.47..834,955.33 rows=12,173 width=579) (actual time=1,741.110..4,436.628 rows=639,283 loops=1)

6. 103.576 3,236.019 ↓ 37.8 344,293 1

Hash Left Join (cost=146,431.04..811,602.94 rows=9,113 width=573) (actual time=1,741.094..3,236.019 rows=344,293 loops=1)

  • Hash Cond: ((rd.id_rd)::integer = (tb_refeicao.id_rd)::integer)
7. 82.533 3,057.106 ↓ 37.8 344,293 1

Hash Left Join (cost=109,176.98..774,324.96 rows=9,113 width=549) (actual time=1,665.742..3,057.106 rows=344,293 loops=1)

  • Hash Cond: ((rd.id_rd)::integer = (tb_sos.id_rd)::integer)
8. 109.151 2,899.962 ↓ 37.8 344,293 1

Hash Join (cost=68,311.96..733,436.02 rows=9,113 width=509) (actual time=1,591.102..2,899.962 rows=344,293 loops=1)

  • Hash Cond: ((rd.id_veiculo)::integer = (ve.id_veiculo)::integer)
9. 82.984 2,787.861 ↓ 37.8 344,293 1

Hash Join (cost=67,889.65..732,989.77 rows=9,113 width=503) (actual time=1,588.085..2,787.861 rows=344,293 loops=1)

  • Hash Cond: ((rd.id_modelo_coleta)::integer = (mc.id_modelo_coleta)::integer)
10. 402.459 2,704.866 ↓ 37.8 344,293 1

Hash Right Join (cost=67,888.09..732,960.23 rows=9,113 width=487) (actual time=1,588.055..2,704.866 rows=344,293 loops=1)

  • Hash Cond: ((tb_parada.id_rd)::integer = (rd.id_rd)::integer)
11. 197.963 2,285.875 ↑ 1.0 2,662,799 1

Append (cost=61,121.10..719,086.86 rows=2,707,188 width=20) (actual time=1,571.435..2,285.875 rows=2,662,799 loops=1)

12. 523.713 2,087.912 ↑ 1.0 2,662,799 1

Bitmap Heap Scan on tb_parada (cost=61,121.10..705,550.92 rows=2,707,188 width=20) (actual time=1,571.434..2,087.912 rows=2,662,799 loops=1)

  • Recheck Cond: ((dt_inicio >= '2020-05-01 00:00:00-03'::timestamp with time zone) AND (dt_inicio <= '2020-05-31 23:59:59-03'::timestamp with time zone))
  • Heap Blocks: exact=46,448
13. 1,564.199 1,564.199 ↑ 1.0 2,662,801 1

Bitmap Index Scan on ind_tb_parada_geomdtinicio (cost=0.00..60,444.30 rows=2,707,188 width=0) (actual time=1,564.199..1,564.199 rows=2,662,801 loops=1)

  • Index Cond: ((dt_inicio >= '2020-05-01 00:00:00-03'::timestamp with time zone) AND (dt_inicio <= '2020-05-31 23:59:59-03'::timestamp with time zone))
14. 4.066 16.532 ↓ 1.3 12,136 1

Hash (cost=6,653.08..6,653.08 rows=9,113 width=471) (actual time=16.532..16.532 rows=12,136 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 2,802kB
15. 12.466 12.466 ↓ 1.3 12,136 1

Index Scan using ind_tb_rd_idfilial_dtini_idveiculo_idrd on tb_rd rd (cost=0.43..6,653.08 rows=9,113 width=471) (actual time=0.034..12.466 rows=12,136 loops=1)

  • Index Cond: (((id_filial)::integer = 55) AND (dt_inicio_terminal >= '2020-05-01 00:00:00-03'::timestamp with time zone) AND (dt_inicio_terminal <= '2020-05-31 23:59:59-03'::timestamp with time zone))
16. 0.006 0.011 ↑ 1.0 25 1

Hash (cost=1.25..1.25 rows=25 width=24) (actual time=0.011..0.011 rows=25 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
17. 0.005 0.005 ↑ 1.0 25 1

Seq Scan on tb_modelo_coleta mc (cost=0.00..1.25 rows=25 width=24) (actual time=0.002..0.005 rows=25 loops=1)

18. 1.583 2.950 ↓ 1.0 10,330 1

Hash (cost=293.25..293.25 rows=10,325 width=14) (actual time=2.950..2.950 rows=10,330 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 620kB
19. 1.367 1.367 ↓ 1.0 10,330 1

Seq Scan on tb_veiculo ve (cost=0.00..293.25 rows=10,325 width=14) (actual time=0.006..1.367 rows=10,330 loops=1)

20. 0.014 74.611 ↑ 10.7 3 1

Hash (cost=40,864.62..40,864.62 rows=32 width=44) (actual time=74.611..74.611 rows=3 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
21. 0.002 74.597 ↑ 10.7 3 1

Subquery Scan on tb_sos (cost=40,863.50..40,864.62 rows=32 width=44) (actual time=74.594..74.597 rows=3 loops=1)

22. 0.021 74.595 ↑ 10.7 3 1

GroupAggregate (cost=40,863.50..40,864.30 rows=32 width=44) (actual time=74.592..74.595 rows=3 loops=1)

  • Group Key: rd_1.id_rd
23. 0.016 74.574 ↑ 10.7 3 1

Sort (cost=40,863.50..40,863.58 rows=32 width=20) (actual time=74.574..74.574 rows=3 loops=1)

  • Sort Key: rd_1.id_rd
  • Sort Method: quicksort Memory: 25kB
24. 0.013 74.558 ↑ 10.7 3 1

Nested Loop (cost=2.00..40,862.70 rows=32 width=20) (actual time=28.661..74.558 rows=3 loops=1)

25. 0.029 74.530 ↑ 10.7 3 1

Nested Loop (cost=1.72..40,852.77 rows=32 width=24) (actual time=28.649..74.530 rows=3 loops=1)

  • Join Filter: ((o.id_modelo_ocorrencia)::integer = (mo.id_modelo_ocorrencia)::integer)
  • Rows Removed by Join Filter: 356
26. 7.061 74.454 ↑ 1.7 47 1

Nested Loop (cost=1.72..40,842.15 rows=81 width=28) (actual time=1.742..74.454 rows=47 loops=1)

27. 4.018 58.566 ↑ 2.2 8,827 1

Nested Loop (cost=1.29..29,238.01 rows=19,418 width=12) (actual time=0.082..58.566 rows=8,827 loops=1)

28. 4.474 21.940 ↑ 1.2 8,152 1

Nested Loop (cost=0.86..18,673.79 rows=9,385 width=12) (actual time=0.061..21.940 rows=8,152 loops=1)

29. 1.504 1.504 ↓ 1.1 7,981 1

Index Only Scan using ind_tb_rd_idfilial_dtini_idveiculo_idrd on tb_rd rd_1 (cost=0.43..212.89 rows=7,026 width=8) (actual time=0.045..1.504 rows=7,981 loops=1)

  • Index Cond: ((id_filial = 194) AND (dt_inicio_terminal >= '2020-05-01 00:00:00-03'::timestamp with time zone) AND (dt_inicio_terminal <= '2020-05-31 23:59:59-03'::timestamp with time zone))
  • Heap Fetches: 98
30. 15.962 15.962 ↑ 2.0 1 7,981

Index Scan using ix01f_tb_viagem on tb_viagem v1 (cost=0.43..2.61 rows=2 width=8) (actual time=0.002..0.002 rows=1 loops=7,981)

  • Index Cond: ((id_rd)::integer = (rd_1.id_rd)::integer)
31. 8.152 32.608 ↑ 7.0 1 8,152

Append (cost=0.43..1.06 rows=7 width=8) (actual time=0.002..0.004 rows=1 loops=8,152)

32. 16.304 16.304 ↑ 3.0 1 8,152

Index Scan using ix01f_tb_trecho_viagem on tb_trecho_viagem tv1 (cost=0.43..0.48 rows=3 width=8) (actual time=0.002..0.002 rows=1 loops=8,152)

  • Index Cond: ((id_viagem)::integer = (v1.id_viagem)::integer)
33. 8.152 8.152 ↓ 0.0 0 8,152

Index Scan using ix01f_tbtrechoviagemu20191111 on tb_trecho_viagem_clust_until_20191111 tv1_1 (cost=0.43..0.54 rows=4 width=8) (actual time=0.001..0.001 rows=0 loops=8,152)

  • Index Cond: ((id_viagem)::integer = (v1.id_viagem)::integer)
34. 8.827 8.827 ↓ 0.0 0 8,827

Index Scan using ix02f_tb_ocorrencia on tb_ocorrencia o (cost=0.43..0.59 rows=1 width=24) (actual time=0.001..0.001 rows=0 loops=8,827)

  • Index Cond: ((id_trecho_viagem)::integer = (tv1.id_trecho_viagem)::integer)
  • Filter: ((dt_inicio >= '2020-05-01 00:00:00-03'::timestamp with time zone) AND (dt_inicio <= '2020-05-31 23:59:59-03'::timestamp with time zone))
35. 0.037 0.047 ↑ 1.0 8 47

Materialize (cost=0.00..1.29 rows=8 width=4) (actual time=0.000..0.001 rows=8 loops=47)

36. 0.010 0.010 ↑ 1.0 8 1

Seq Scan on tb_modelo_ocorrencia mo (cost=0.00..1.25 rows=8 width=4) (actual time=0.009..0.010 rows=8 loops=1)

  • Filter: ((tp_ocorrencia)::smallint = 0)
  • Rows Removed by Filter: 12
37. 0.015 0.015 ↑ 1.0 1 3

Index Only Scan using pk00_tb_veiculo on tb_veiculo ve_1 (cost=0.29..0.31 rows=1 width=4) (actual time=0.005..0.005 rows=1 loops=3)

  • Index Cond: (id_veiculo = (rd_1.id_veiculo)::integer)
  • Heap Fetches: 0
38. 0.219 75.337 ↓ 318.4 1,592 1

Hash (cost=37,253.99..37,253.99 rows=5 width=28) (actual time=75.337..75.337 rows=1,592 loops=1)

  • Buckets: 2,048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 110kB
39. 0.151 75.118 ↓ 318.4 1,592 1

Subquery Scan on tb_refeicao (cost=37,253.83..37,253.99 rows=5 width=28) (actual time=74.330..75.118 rows=1,592 loops=1)

40. 0.543 74.967 ↓ 318.4 1,592 1

GroupAggregate (cost=37,253.83..37,253.94 rows=5 width=28) (actual time=74.329..74.967 rows=1,592 loops=1)

  • Group Key: rd_2.id_rd
41. 0.562 74.424 ↓ 323.8 1,619 1

Sort (cost=37,253.83..37,253.84 rows=5 width=20) (actual time=74.321..74.424 rows=1,619 loops=1)

  • Sort Key: rd_2.id_rd
  • Sort Method: quicksort Memory: 175kB
42. 1.300 73.862 ↓ 323.8 1,619 1

Nested Loop (cost=413.27..37,253.77 rows=5 width=20) (actual time=11.447..73.862 rows=1,619 loops=1)

43. 1.632 70.943 ↓ 323.8 1,619 1

Hash Join (cost=412.99..37,252.23 rows=5 width=24) (actual time=11.430..70.943 rows=1,619 loops=1)

  • Hash Cond: ((v1_1.id_rd)::integer = (rd_2.id_rd)::integer)
44. 3.828 65.896 ↓ 2.0 6,027 1

Nested Loop (cost=23.10..36,854.59 rows=2,952 width=20) (actual time=7.337..65.896 rows=6,027 loops=1)

45. 4.451 50.014 ↓ 2.0 6,027 1

Nested Loop (cost=22.66..35,508.11 rows=2,952 width=20) (actual time=7.325..50.014 rows=6,027 loops=1)

46. 4.353 21.455 ↓ 2.0 6,027 1

Hash Join (cost=22.24..26,625.40 rows=2,952 width=20) (actual time=7.305..21.455 rows=6,027 loops=1)

  • Hash Cond: ((o_1.id_modelo_ocorrencia)::integer = (mo_1.id_modelo_ocorrencia)::integer)
47. 16.916 17.091 ↑ 1.1 55,752 1

Bitmap Heap Scan on tb_ocorrencia o_1 (cost=20.97..26,436.34 rows=59,033 width=24) (actual time=6.654..17.091 rows=55,752 loops=1)

  • Recheck Cond: ((dt_inicio >= '2020-05-01 00:00:00-03'::timestamp with time zone) AND (dt_inicio <= '2020-05-31 23:59:59-03'::timestamp with time zone))
  • Rows Removed by Index Recheck: 85,235
  • Heap Blocks: lossy=2,008
48. 0.175 0.175 ↑ 3.0 20,160 1

Bitmap Index Scan on ind_tb_ocorrencia_dtinicio (cost=0.00..6.22 rows=61,291 width=0) (actual time=0.175..0.175 rows=20,160 loops=1)

  • Index Cond: ((dt_inicio >= '2020-05-01 00:00:00-03'::timestamp with time zone) AND (dt_inicio <= '2020-05-31 23:59:59-03'::timestamp with time zone))
49. 0.004 0.011 ↑ 1.0 1 1

Hash (cost=1.25..1.25 rows=1 width=4) (actual time=0.011..0.011 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
50. 0.007 0.007 ↑ 1.0 1 1

Seq Scan on tb_modelo_ocorrencia mo_1 (cost=0.00..1.25 rows=1 width=4) (actual time=0.005..0.007 rows=1 loops=1)

  • Filter: ((tp_ocorrencia)::smallint = 2)
  • Rows Removed by Filter: 19
51. 6.027 24.108 ↑ 2.0 1 6,027

Append (cost=0.43..2.99 rows=2 width=8) (actual time=0.003..0.004 rows=1 loops=6,027)

52. 12.054 12.054 ↑ 1.0 1 6,027

Index Scan using pk00_tb_trecho_viagem on tb_trecho_viagem tv1_2 (cost=0.43..0.88 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=6,027)

  • Index Cond: ((id_trecho_viagem)::integer = (o_1.id_trecho_viagem)::integer)
53. 6.027 6.027 ↓ 0.0 0 6,027

Index Scan using pk00_tbtrechoviagemu20191111 on tb_trecho_viagem_clust_until_20191111 tv1_3 (cost=0.43..2.10 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=6,027)

  • Index Cond: ((id_trecho_viagem)::integer = (o_1.id_trecho_viagem)::integer)
54. 12.054 12.054 ↑ 1.0 1 6,027

Index Scan using pk00_tb_viagem on tb_viagem v1_1 (cost=0.43..0.46 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=6,027)

  • Index Cond: ((id_viagem)::integer = (tv1_2.id_viagem)::integer)
55. 1.459 3.415 ↓ 1.3 12,136 1

Hash (cost=275.98..275.98 rows=9,113 width=8) (actual time=3.415..3.415 rows=12,136 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 603kB
56. 1.956 1.956 ↓ 1.3 12,136 1

Index Only Scan using ind_tb_rd_idfilial_dtini_idveiculo_idrd on tb_rd rd_2 (cost=0.43..275.98 rows=9,113 width=8) (actual time=0.024..1.956 rows=12,136 loops=1)

  • Index Cond: ((id_filial = 55) AND (dt_inicio_terminal >= '2020-05-01 00:00:00-03'::timestamp with time zone) AND (dt_inicio_terminal <= '2020-05-31 23:59:59-03'::timestamp with time zone))
  • Heap Fetches: 165
57. 1.619 1.619 ↑ 1.0 1 1,619

Index Only Scan using pk00_tb_veiculo on tb_veiculo ve_2 (cost=0.29..0.31 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=1,619)

  • Index Cond: (id_veiculo = (rd_2.id_veiculo)::integer)
  • Heap Fetches: 326
58. 688.586 688.586 ↑ 1.0 2 344,293

Index Scan using ix01f_tb_viagem on tb_viagem v (cost=0.43..2.54 rows=2 width=10) (actual time=0.002..0.002 rows=2 loops=344,293)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
59. 1,278.566 3,835.698 ↑ 2.3 3 639,283

Append (cost=0.43..3.04 rows=7 width=61) (actual time=0.003..0.006 rows=3 loops=639,283)

60. 1,917.849 1,917.849 ↑ 1.0 3 639,283

Index Scan using ix01f_tb_trecho_viagem on tb_trecho_viagem tv (cost=0.43..1.48 rows=3 width=115) (actual time=0.002..0.003 rows=3 loops=639,283)

  • Index Cond: ((id_viagem)::integer = (v.id_viagem)::integer)
61. 639.283 639.283 ↓ 0.0 0 639,283

Index Scan using ix01f_tbtrechoviagemu20191111 on tb_trecho_viagem_clust_until_20191111 tv_1 (cost=0.43..1.53 rows=4 width=54) (actual time=0.001..0.001 rows=0 loops=639,283)

  • Index Cond: ((id_viagem)::integer = (v.id_viagem)::integer)
62.          

SubPlan (for GroupAggregate)

63. 12.136 194.176 ↓ 0.0 0 12,136

Limit (cost=15.67..15.67 rows=1 width=40) (actual time=0.016..0.016 rows=0 loops=12,136)

64. 24.272 182.040 ↓ 0.0 0 12,136

Sort (cost=15.67..15.68 rows=3 width=40) (actual time=0.015..0.015 rows=0 loops=12,136)

  • Sort Key: eq.dt_inicio
  • Sort Method: quicksort Memory: 25kB
65. 22.100 157.768 ↓ 0.0 0 12,136

Nested Loop Left Join (cost=1.15..15.65 rows=3 width=40) (actual time=0.013..0.013 rows=0 loops=12,136)

66. 32.064 121.360 ↓ 0.0 0 12,136

Nested Loop Left Join (cost=0.86..14.74 rows=3 width=12) (actual time=0.010..0.010 rows=0 loops=12,136)

67. 60.680 60.680 ↓ 0.0 0 12,136

Index Scan using ix03f_tb_equipe on tb_equipe eq (cost=0.43..2.88 rows=3 width=12) (actual time=0.005..0.005 rows=0 loops=12,136)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
68. 28.616 28.616 ↑ 1.0 1 3,577

Index Scan using pk00_tb_equipe_coletor on tb_equipe_coletor ec1 (cost=0.43..3.94 rows=1 width=8) (actual time=0.007..0.008 rows=1 loops=3,577)

  • Index Cond: ((eq.id_equipe)::integer = (id_equipe)::integer)
  • Filter: (vl_ordem = 1)
  • Rows Removed by Filter: 2
69. 14.308 14.308 ↑ 1.0 1 3,577

Index Scan using pk00_tb_coletor on tb_coletor c1 (cost=0.29..0.31 rows=1 width=28) (actual time=0.004..0.004 rows=1 loops=3,577)

  • Index Cond: ((ec1.id_coletor)::integer = (id_coletor)::integer)
70. 12.136 109.224 ↓ 0.0 0 12,136

Limit (cost=15.67..15.67 rows=1 width=40) (actual time=0.009..0.009 rows=0 loops=12,136)

71. 12.136 97.088 ↓ 0.0 0 12,136

Sort (cost=15.67..15.68 rows=3 width=40) (actual time=0.008..0.008 rows=0 loops=12,136)

  • Sort Key: eq_1.dt_inicio
  • Sort Method: quicksort Memory: 25kB
72. 17.118 84.952 ↓ 0.0 0 12,136

Nested Loop Left Join (cost=1.15..15.65 rows=3 width=40) (actual time=0.007..0.007 rows=0 loops=12,136)

73. 25.677 60.680 ↓ 0.0 0 12,136

Nested Loop Left Join (cost=0.86..14.74 rows=3 width=12) (actual time=0.005..0.005 rows=0 loops=12,136)

74. 24.272 24.272 ↓ 0.0 0 12,136

Index Scan using ix03f_tb_equipe on tb_equipe eq_1 (cost=0.43..2.88 rows=3 width=12) (actual time=0.002..0.002 rows=0 loops=12,136)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
75. 10.731 10.731 ↑ 1.0 1 3,577

Index Scan using pk00_tb_equipe_coletor on tb_equipe_coletor ec1_1 (cost=0.43..3.94 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=3,577)

  • Index Cond: ((eq_1.id_equipe)::integer = (id_equipe)::integer)
  • Filter: (vl_ordem = 2)
  • Rows Removed by Filter: 2
76. 7.154 7.154 ↑ 1.0 1 3,577

Index Scan using pk00_tb_coletor on tb_coletor c1_1 (cost=0.29..0.31 rows=1 width=28) (actual time=0.002..0.002 rows=1 loops=3,577)

  • Index Cond: ((ec1_1.id_coletor)::integer = (id_coletor)::integer)
77. 0.000 97.088 ↓ 0.0 0 12,136

Limit (cost=15.67..15.67 rows=1 width=40) (actual time=0.008..0.008 rows=0 loops=12,136)

78. 12.136 97.088 ↓ 0.0 0 12,136

Sort (cost=15.67..15.68 rows=3 width=40) (actual time=0.008..0.008 rows=0 loops=12,136)

  • Sort Key: eq_2.dt_inicio
  • Sort Method: quicksort Memory: 25kB
79. 17.118 84.952 ↓ 0.0 0 12,136

Nested Loop Left Join (cost=1.15..15.65 rows=3 width=40) (actual time=0.006..0.007 rows=0 loops=12,136)

80. 25.677 60.680 ↓ 0.0 0 12,136

Nested Loop Left Join (cost=0.86..14.74 rows=3 width=12) (actual time=0.005..0.005 rows=0 loops=12,136)

81. 24.272 24.272 ↓ 0.0 0 12,136

Index Scan using ix03f_tb_equipe on tb_equipe eq_2 (cost=0.43..2.88 rows=3 width=12) (actual time=0.001..0.002 rows=0 loops=12,136)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
82. 10.731 10.731 ↑ 1.0 1 3,577

Index Scan using pk00_tb_equipe_coletor on tb_equipe_coletor ec1_2 (cost=0.43..3.94 rows=1 width=8) (actual time=0.002..0.003 rows=1 loops=3,577)

  • Index Cond: ((eq_2.id_equipe)::integer = (id_equipe)::integer)
  • Filter: (vl_ordem = 3)
  • Rows Removed by Filter: 2
83. 7.154 7.154 ↑ 1.0 1 3,577

Index Scan using pk00_tb_coletor on tb_coletor c1_2 (cost=0.29..0.31 rows=1 width=28) (actual time=0.002..0.002 rows=1 loops=3,577)

  • Index Cond: ((ec1_2.id_coletor)::integer = (id_coletor)::integer)
84. 12.136 109.224 ↓ 0.0 0 12,136

Limit (cost=15.67..15.67 rows=1 width=40) (actual time=0.008..0.009 rows=0 loops=12,136)

85. 12.136 97.088 ↓ 0.0 0 12,136

Sort (cost=15.67..15.68 rows=3 width=40) (actual time=0.008..0.008 rows=0 loops=12,136)

  • Sort Key: eq_3.dt_inicio
  • Sort Method: quicksort Memory: 25kB
86. 20.695 84.952 ↓ 0.0 0 12,136

Nested Loop Left Join (cost=1.15..15.65 rows=3 width=40) (actual time=0.006..0.007 rows=0 loops=12,136)

87. 37.813 60.680 ↓ 0.0 0 12,136

Nested Loop Left Join (cost=0.86..14.74 rows=3 width=12) (actual time=0.005..0.005 rows=0 loops=12,136)

88. 12.136 12.136 ↓ 0.0 0 12,136

Index Scan using ix03f_tb_equipe on tb_equipe eq_3 (cost=0.43..2.88 rows=3 width=12) (actual time=0.001..0.001 rows=0 loops=12,136)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
89. 10.731 10.731 ↓ 0.0 0 3,577

Index Scan using pk00_tb_equipe_coletor on tb_equipe_coletor ec1_3 (cost=0.43..3.94 rows=1 width=8) (actual time=0.002..0.003 rows=0 loops=3,577)

  • Index Cond: ((eq_3.id_equipe)::integer = (id_equipe)::integer)
  • Filter: (vl_ordem = 4)
  • Rows Removed by Filter: 2
90. 3.577 3.577 ↓ 0.0 0 3,577

Index Scan using pk00_tb_coletor on tb_coletor c1_3 (cost=0.29..0.31 rows=1 width=28) (actual time=0.001..0.001 rows=0 loops=3,577)

  • Index Cond: ((ec1_3.id_coletor)::integer = (id_coletor)::integer)
91. 12.136 97.088 ↓ 0.0 0 12,136

Limit (cost=15.67..15.68 rows=1 width=40) (actual time=0.008..0.008 rows=0 loops=12,136)

92. 12.136 84.952 ↓ 0.0 0 12,136

Sort (cost=15.67..15.68 rows=3 width=40) (actual time=0.007..0.007 rows=0 loops=12,136)

  • Sort Key: eq_4.dt_inicio
  • Sort Method: quicksort Memory: 25kB
93. 12.136 72.816 ↓ 0.0 0 12,136

Nested Loop Left Join (cost=1.15..15.66 rows=3 width=40) (actual time=0.006..0.006 rows=0 loops=12,136)

94. 37.813 60.680 ↓ 0.0 0 12,136

Nested Loop Left Join (cost=0.86..14.74 rows=3 width=12) (actual time=0.005..0.005 rows=0 loops=12,136)

95. 12.136 12.136 ↓ 0.0 0 12,136

Index Scan using ix03f_tb_equipe on tb_equipe eq_4 (cost=0.43..2.88 rows=3 width=12) (actual time=0.001..0.001 rows=0 loops=12,136)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
96. 10.731 10.731 ↓ 0.0 0 3,577

Index Scan using pk00_tb_equipe_coletor on tb_equipe_coletor ec1_4 (cost=0.43..3.94 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=3,577)

  • Index Cond: ((eq_4.id_equipe)::integer = (id_equipe)::integer)
  • Filter: (vl_ordem = 5)
  • Rows Removed by Filter: 3
97. 0.000 0.000 ↓ 0.0 0 3,577

Index Scan using pk00_tb_coletor on tb_coletor c1_4 (cost=0.29..0.31 rows=1 width=28) (actual time=0.000..0.000 rows=0 loops=3,577)

  • Index Cond: ((ec1_4.id_coletor)::integer = (id_coletor)::integer)
98. 12.136 36.408 ↓ 0.0 0 12,136

Limit (cost=0.43..2.88 rows=1 width=1) (actual time=0.003..0.003 rows=0 loops=12,136)

99. 24.272 24.272 ↓ 0.0 0 12,136

Index Scan using ix03f_tb_equipe on tb_equipe eq_5 (cost=0.43..2.88 rows=1 width=1) (actual time=0.002..0.002 rows=0 loops=12,136)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
  • Filter: (NOT vf_inicial)
  • Rows Removed by Filter: 0
100. 24.272 60.680 ↓ 0.0 0 12,136

Limit (cost=0.42..2.84 rows=1 width=5) (actual time=0.005..0.005 rows=0 loops=12,136)

101. 36.408 36.408 ↓ 0.0 0 12,136

Index Scan using ix00f_tb_abastecimento on tb_abastecimento (cost=0.42..2.84 rows=1 width=5) (actual time=0.003..0.003 rows=0 loops=12,136)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
102. 24.272 36.408 ↓ 0.0 0 12,136

Limit (cost=0.42..2.84 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=12,136)

103. 12.136 12.136 ↓ 0.0 0 12,136

Index Scan using ix00f_tb_abastecimento on tb_abastecimento tb_abastecimento_1 (cost=0.42..2.84 rows=1 width=4) (actual time=0.001..0.001 rows=0 loops=12,136)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
104. 3.156 3.156 ↑ 1.0 1 1,578

Index Scan using pk00_tb_geometria on tb_geometria g_4 (cost=0.43..2.85 rows=1 width=43) (actual time=0.002..0.002 rows=1 loops=1,578)

  • Index Cond: ((id_geometria)::integer = (tv.id_local_clt)::integer)
105. 15.610 15.610 ↑ 1.0 1 7,805

Index Scan using pk00_tb_geometria on tb_geometria g_3 (cost=0.43..2.85 rows=1 width=43) (actual time=0.002..0.002 rows=1 loops=7,805)

  • Index Cond: ((id_geometria)::integer = (tv.id_local_clt)::integer)
106. 80.228 80.228 ↑ 1.0 1 40,114

Index Scan using pk00_tb_geometria on tb_geometria g_2 (cost=0.43..2.85 rows=1 width=43) (actual time=0.002..0.002 rows=1 loops=40,114)

  • Index Cond: ((id_geometria)::integer = (tv.id_local_clt)::integer)
107. 245.646 245.646 ↑ 1.0 1 122,823

Index Scan using pk00_tb_geometria on tb_geometria g_1 (cost=0.43..2.85 rows=1 width=43) (actual time=0.002..0.002 rows=1 loops=122,823)

  • Index Cond: ((id_geometria)::integer = (tv.id_local_clt)::integer)
108. 436.298 436.298 ↑ 1.0 1 218,149

Index Scan using pk00_tb_geometria on tb_geometria g (cost=0.43..2.85 rows=1 width=43) (actual time=0.002..0.002 rows=1 loops=218,149)

  • Index Cond: ((id_geometria)::integer = (tv.id_local_clt)::integer)
Planning time : 9.760 ms
Execution time : 191,655.994 ms