explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qws4

Settings
# exclusive inclusive rows x rows loops node
1. 32.752 118,856.615 ↑ 2.1 12,136 1

Sort (cost=12,262,732.69..12,262,795.40 rows=25,082 width=797) (actual time=118,854.797..118,856.615 rows=12,136 loops=1)

  • Sort Key: rd.dt_inicio_terminal
  • Sort Method: quicksort Memory: 4,338kB
2. 76,644.850 118,823.863 ↑ 2.1 12,136 1

GroupAggregate (cost=134,992.85..12,260,899.90 rows=25,082 width=797) (actual time=9,067.747..118,823.863 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. 123.066 9,052.334 ↓ 1.5 38,617 1

Sort (cost=134,992.85..135,055.55 rows=25,082 width=623) (actual time=9,035.542..9,052.334 rows=38,617 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: quicksort Memory: 26,763kB
4. 15.348 8,929.268 ↓ 1.5 38,617 1

Nested Loop (cost=89,571.70..133,160.06 rows=25,082 width=623) (actual time=8,438.752..8,929.268 rows=38,617 loops=1)

5. 7.910 8,806.370 ↓ 1.5 17,925 1

Nested Loop (cost=89,571.27..119,513.79 rows=12,123 width=570) (actual time=8,438.718..8,806.370 rows=17,925 loops=1)

6. 4.587 8,762.052 ↓ 1.3 12,136 1

Hash Left Join (cost=89,570.84..96,273.91 rows=9,071 width=564) (actual time=8,438.697..8,762.052 rows=12,136 loops=1)

  • Hash Cond: ((rd.id_rd)::integer = (tb_refeicao.id_rd)::integer)
7. 2.919 7,482.839 ↓ 1.3 12,136 1

Hash Left Join (cost=52,594.04..59,273.30 rows=9,071 width=540) (actual time=7,164.057..7,482.839 rows=12,136 loops=1)

  • Hash Cond: ((rd.id_rd)::integer = (tb_sos.id_rd)::integer)
8. 4.014 333.329 ↓ 1.3 12,136 1

Hash Join (cost=423.16..7,078.61 rows=9,071 width=500) (actual time=17.446..333.329 rows=12,136 loops=1)

  • Hash Cond: ((rd.id_veiculo)::integer = (ve.id_veiculo)::integer)
9. 3.257 318.895 ↓ 1.3 12,136 1

Hash Join (cost=2.00..6,633.62 rows=9,071 width=494) (actual time=6.957..318.895 rows=12,136 loops=1)

  • Hash Cond: ((rd.id_modelo_coleta)::integer = (mc.id_modelo_coleta)::integer)
10. 315.622 315.622 ↓ 1.3 12,136 1

Index Scan using ind_tb_rd_idfilial_dtini_idveiculo_idrd on tb_rd rd (cost=0.43..6,604.21 rows=9,071 width=478) (actual time=6.915..315.622 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))
11. 0.008 0.016 ↑ 1.0 25 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
12. 0.008 0.008 ↑ 1.0 25 1

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

13. 1.823 10.420 ↑ 1.0 10,274 1

Hash (cost=292.74..292.74 rows=10,274 width=14) (actual time=10.420..10.420 rows=10,274 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 618kB
14. 8.597 8.597 ↑ 1.0 10,274 1

Seq Scan on tb_veiculo ve (cost=0.00..292.74 rows=10,274 width=14) (actual time=0.004..8.597 rows=10,274 loops=1)

15. 0.025 7,146.591 ↓ 2.3 97 1

Hash (cost=52,170.35..52,170.35 rows=42 width=44) (actual time=7,146.591..7,146.591 rows=97 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 14kB
16. 0.010 7,146.566 ↓ 2.3 97 1

Subquery Scan on tb_sos (cost=52,168.88..52,170.35 rows=42 width=44) (actual time=7,146.469..7,146.566 rows=97 loops=1)

17. 0.388 7,146.556 ↓ 2.3 97 1

GroupAggregate (cost=52,168.88..52,169.93 rows=42 width=44) (actual time=7,146.467..7,146.556 rows=97 loops=1)

  • Group Key: rd_1.id_rd
18. 0.199 7,146.168 ↓ 2.8 117 1

Sort (cost=52,168.88..52,168.99 rows=42 width=20) (actual time=7,146.161..7,146.168 rows=117 loops=1)

  • Sort Key: rd_1.id_rd
  • Sort Method: quicksort Memory: 34kB
19. 0.457 7,145.969 ↓ 2.8 117 1

Nested Loop (cost=2.00..52,167.75 rows=42 width=20) (actual time=79.117..7,145.969 rows=117 loops=1)

20. 40.123 7,144.342 ↓ 2.8 117 1

Nested Loop (cost=1.72..52,154.79 rows=42 width=24) (actual time=79.092..7,144.342 rows=117 loops=1)

  • Join Filter: ((o.id_modelo_ocorrencia)::integer = (mo.id_modelo_ocorrencia)::integer)
  • Rows Removed by Join Filter: 285,309
21. 65.996 7,104.219 ↓ 340.5 35,755 1

Nested Loop (cost=1.72..52,141.39 rows=105 width=28) (actual time=46.856..7,104.219 rows=35,755 loops=1)

22. 6.650 5,802.479 ↓ 1.5 38,617 1

Nested Loop (cost=1.29..37,152.66 rows=25,082 width=12) (actual time=6.110..5,802.479 rows=38,617 loops=1)

23. 15.833 1,924.029 ↓ 1.5 17,925 1

Nested Loop (cost=0.86..23,506.39 rows=12,123 width=12) (actual time=2.275..1,924.029 rows=17,925 loops=1)

24. 14.980 14.980 ↓ 1.3 12,136 1

Index Only Scan using ind_tb_rd_idfilial_dtini_idveiculo_idrd on tb_rd rd_1 (cost=0.43..266.51 rows=9,071 width=8) (actual time=0.040..14.980 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: 21
25. 1,893.216 1,893.216 ↑ 2.0 1 12,136

Index Scan using ix01f_tb_viagem on tb_viagem v1 (cost=0.43..2.54 rows=2 width=8) (actual time=0.104..0.156 rows=1 loops=12,136)

  • Index Cond: ((id_rd)::integer = (rd_1.id_rd)::integer)
26. 35.850 3,871.800 ↑ 3.5 2 17,925

Append (cost=0.43..1.06 rows=7 width=8) (actual time=0.169..0.216 rows=2 loops=17,925)

27. 3,818.025 3,818.025 ↑ 1.5 2 17,925

Index Scan using ix01f_tb_trecho_viagem on tb_trecho_viagem tv1 (cost=0.43..0.48 rows=3 width=8) (actual time=0.168..0.213 rows=2 loops=17,925)

  • Index Cond: ((id_viagem)::integer = (v1.id_viagem)::integer)
28. 17.925 17.925 ↓ 0.0 0 17,925

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=17,925)

  • Index Cond: ((id_viagem)::integer = (v1.id_viagem)::integer)
29. 1,235.744 1,235.744 ↑ 1.0 1 38,617

Index Scan using ix02f_tb_ocorrencia on tb_ocorrencia o (cost=0.43..0.59 rows=1 width=24) (actual time=0.015..0.032 rows=1 loops=38,617)

  • 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))
  • Rows Removed by Filter: 0
30. 0.000 0.000 ↑ 1.0 8 35,755

Materialize (cost=0.00..1.29 rows=8 width=4) (actual time=0.000..0.000 rows=8 loops=35,755)

31. 0.011 0.011 ↑ 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.011 rows=8 loops=1)

  • Filter: ((tp_ocorrencia)::smallint = 0)
  • Rows Removed by Filter: 12
32. 1.170 1.170 ↑ 1.0 1 117

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

  • Index Cond: (id_veiculo = (rd_1.id_veiculo)::integer)
  • Heap Fetches: 0
33. 0.269 1,274.626 ↓ 318.4 1,592 1

Hash (cost=36,976.74..36,976.74 rows=5 width=28) (actual time=1,274.626..1,274.626 rows=1,592 loops=1)

  • Buckets: 2,048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 110kB
34. 0.147 1,274.357 ↓ 318.4 1,592 1

Subquery Scan on tb_refeicao (cost=36,976.58..36,976.74 rows=5 width=28) (actual time=1,273.537..1,274.357 rows=1,592 loops=1)

35. 0.571 1,274.210 ↓ 318.4 1,592 1

GroupAggregate (cost=36,976.58..36,976.69 rows=5 width=28) (actual time=1,273.536..1,274.210 rows=1,592 loops=1)

  • Group Key: rd_2.id_rd
36. 1.017 1,273.639 ↓ 323.8 1,619 1

Sort (cost=36,976.58..36,976.59 rows=5 width=20) (actual time=1,273.525..1,273.639 rows=1,619 loops=1)

  • Sort Key: rd_2.id_rd
  • Sort Method: quicksort Memory: 175kB
37. 1.022 1,272.622 ↓ 323.8 1,619 1

Nested Loop (cost=403.25..36,976.52 rows=5 width=20) (actual time=73.017..1,272.622 rows=1,619 loops=1)

38. 2.717 1,268.362 ↓ 323.8 1,619 1

Hash Join (cost=402.96..36,974.98 rows=5 width=24) (actual time=72.990..1,268.362 rows=1,619 loops=1)

  • Hash Cond: ((v1_1.id_rd)::integer = (rd_2.id_rd)::integer)
39. 4.426 1,262.073 ↓ 2.0 6,027 1

Nested Loop (cost=23.07..36,587.35 rows=2,947 width=20) (actual time=61.288..1,262.073 rows=6,027 loops=1)

40. 0.380 823.703 ↓ 2.0 6,027 1

Nested Loop (cost=22.64..35,243.14 rows=2,947 width=20) (actual time=59.238..823.703 rows=6,027 loops=1)

41. 4.997 82.002 ↓ 2.0 6,027 1

Hash Join (cost=22.21..26,417.63 rows=2,947 width=20) (actual time=57.359..82.002 rows=6,027 loops=1)

  • Hash Cond: ((o_1.id_modelo_ocorrencia)::integer = (mo_1.id_modelo_ocorrencia)::integer)
42. 71.722 76.995 ↑ 1.1 55,752 1

Bitmap Heap Scan on tb_ocorrencia o_1 (cost=20.95..26,228.84 rows=58,948 width=24) (actual time=56.457..76.995 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: 82,266
  • Heap Blocks: lossy=1,963
43. 5.273 5.273 ↑ 3.0 19,840 1

Bitmap Index Scan on ind_tb_ocorrencia_dtinicio (cost=0.00..6.21 rows=58,993 width=0) (actual time=5.273..5.273 rows=19,840 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))
44. 0.002 0.010 ↑ 1.0 1 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
45. 0.008 0.008 ↑ 1.0 1 1

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

  • Filter: ((tp_ocorrencia)::smallint = 2)
  • Rows Removed by Filter: 19
46. 12.054 741.321 ↑ 2.0 1 6,027

Append (cost=0.43..2.97 rows=2 width=8) (actual time=0.120..0.123 rows=1 loops=6,027)

47. 723.240 723.240 ↑ 1.0 1 6,027

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

  • Index Cond: ((id_trecho_viagem)::integer = (o_1.id_trecho_viagem)::integer)
48. 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)
49. 433.944 433.944 ↑ 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.072..0.072 rows=1 loops=6,027)

  • Index Cond: ((id_viagem)::integer = (tv1_2.id_viagem)::integer)
50. 1.554 3.572 ↓ 1.3 12,136 1

Hash (cost=266.51..266.51 rows=9,071 width=8) (actual time=3.572..3.572 rows=12,136 loops=1)

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

Index Only Scan using ind_tb_rd_idfilial_dtini_idveiculo_idrd on tb_rd rd_2 (cost=0.43..266.51 rows=9,071 width=8) (actual time=0.044..2.018 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: 21
52. 3.238 3.238 ↑ 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.002..0.002 rows=1 loops=1,619)

  • Index Cond: (id_veiculo = (rd_2.id_veiculo)::integer)
  • Heap Fetches: 0
53. 36.408 36.408 ↑ 2.0 1 12,136

Index Scan using ix01f_tb_viagem on tb_viagem v (cost=0.43..2.54 rows=2 width=10) (actual time=0.002..0.003 rows=1 loops=12,136)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
54. 17.925 107.550 ↑ 3.5 2 17,925

Append (cost=0.43..1.06 rows=7 width=61) (actual time=0.003..0.006 rows=2 loops=17,925)

55. 71.700 71.700 ↑ 1.5 2 17,925

Index Scan using ix01f_tb_trecho_viagem on tb_trecho_viagem tv (cost=0.43..0.48 rows=3 width=116) (actual time=0.002..0.004 rows=2 loops=17,925)

  • Index Cond: ((id_viagem)::integer = (v.id_viagem)::integer)
56. 17.925 17.925 ↓ 0.0 0 17,925

Index Scan using ix01f_tbtrechoviagemu20191111 on tb_trecho_viagem_clust_until_20191111 tv_1 (cost=0.43..0.54 rows=4 width=54) (actual time=0.001..0.001 rows=0 loops=17,925)

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

SubPlan (for GroupAggregate)

58. 84.952 30,873.984 ↑ 1.0 1 12,136

Aggregate (cost=380.50..380.51 rows=1 width=16) (actual time=2.544..2.544 rows=1 loops=12,136)

59. 60.680 30,789.032 ↑ 7.8 28 12,136

Append (cost=105.21..379.41 rows=218 width=16) (actual time=2.501..2.537 rows=28 loops=12,136)

60. 5,970.912 30,643.400 ↑ 3.8 28 12,136

Bitmap Heap Scan on tb_parada pa (cost=105.21..232.24 rows=105 width=16) (actual time=2.499..2.525 rows=28 loops=12,136)

  • Recheck Cond: ((id_rd)::integer = (rd.id_rd)::integer)
  • Heap Blocks: exact=328,200
61. 24,672.488 24,672.488 ↑ 3.8 28 12,136

Bitmap Index Scan on ind_tb_parada_idrd_gin (cost=0.00..105.19 rows=105 width=0) (actual time=2.033..2.033 rows=28 loops=12,136)

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

Bitmap Heap Scan on tb_parada_until_201810 pa_1 (cost=9.27..146.08 rows=113 width=16) (actual time=0.007..0.007 rows=0 loops=12,136)

  • Recheck Cond: ((id_rd)::integer = (rd.id_rd)::integer)
63. 60.680 60.680 ↓ 0.0 0 12,136

Bitmap Index Scan on ind_tb_tbparadau201810_idrd (cost=0.00..9.24 rows=113 width=0) (actual time=0.005..0.005 rows=0 loops=12,136)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
64. 12.136 1,492.728 ↓ 0.0 0 12,136

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

65. 36.408 1,480.592 ↓ 0.0 0 12,136

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

  • Sort Key: eq.dt_inicio
  • Sort Method: quicksort Memory: 25kB
66. 21.344 1,444.184 ↓ 0.0 0 12,136

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

67. 33.432 1,383.504 ↓ 0.0 0 12,136

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

68. 509.712 509.712 ↓ 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.041..0.042 rows=0 loops=12,136)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
69. 840.360 840.360 ↑ 1.0 1 3,576

Index Scan using pk00_tb_equipe_coletor on tb_equipe_coletor ec1 (cost=0.43..3.94 rows=1 width=8) (actual time=0.188..0.235 rows=1 loops=3,576)

  • Index Cond: ((eq.id_equipe)::integer = (id_equipe)::integer)
  • Filter: (vl_ordem = 1)
  • Rows Removed by Filter: 2
70. 39.336 39.336 ↑ 1.0 1 3,576

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

  • Index Cond: ((ec1.id_coletor)::integer = (id_coletor)::integer)
71. 0.000 133.496 ↓ 0.0 0 12,136

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

72. 12.136 133.496 ↓ 0.0 0 12,136

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

  • Sort Key: eq_1.dt_inicio
  • Sort Method: quicksort Memory: 25kB
73. 28.496 121.360 ↓ 0.0 0 12,136

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

74. 25.680 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)

75. 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)
76. 10.728 10.728 ↑ 1.0 1 3,576

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,576)

  • Index Cond: ((eq_1.id_equipe)::integer = (id_equipe)::integer)
  • Filter: (vl_ordem = 2)
  • Rows Removed by Filter: 2
77. 32.184 32.184 ↑ 1.0 1 3,576

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

  • Index Cond: ((ec1_1.id_coletor)::integer = (id_coletor)::integer)
78. 12.136 133.496 ↓ 0.0 0 12,136

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

79. 12.136 121.360 ↓ 0.0 0 12,136

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

  • Sort Key: eq_2.dt_inicio
  • Sort Method: quicksort Memory: 25kB
80. 19.936 109.224 ↓ 0.0 0 12,136

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

81. 37.816 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)

82. 12.136 12.136 ↓ 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.001 rows=0 loops=12,136)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
83. 10.728 10.728 ↑ 1.0 1 3,576

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,576)

  • Index Cond: ((eq_2.id_equipe)::integer = (id_equipe)::integer)
  • Filter: (vl_ordem = 3)
  • Rows Removed by Filter: 2
84. 28.608 28.608 ↑ 1.0 1 3,576

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

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

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

86. 12.136 109.224 ↓ 0.0 0 12,136

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

  • Sort Key: eq_3.dt_inicio
  • Sort Method: quicksort Memory: 25kB
87. 11.376 97.088 ↓ 0.0 0 12,136

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

88. 37.816 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)

89. 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)
90. 10.728 10.728 ↓ 0.0 0 3,576

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,576)

  • Index Cond: ((eq_3.id_equipe)::integer = (id_equipe)::integer)
  • Filter: (vl_ordem = 4)
  • Rows Removed by Filter: 2
91. 25.032 25.032 ↓ 0.0 0 3,576

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

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

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

93. 12.136 84.952 ↓ 0.0 0 12,136

Sort (cost=15.68..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
94. 8.560 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)

95. 41.392 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)

96. 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)
97. 7.152 7.152 ↓ 0.0 0 3,576

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.002..0.002 rows=0 loops=3,576)

  • Index Cond: ((eq_4.id_equipe)::integer = (id_equipe)::integer)
  • Filter: (vl_ordem = 5)
  • Rows Removed by Filter: 3
98. 3.576 3.576 ↓ 0.0 0 3,576

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

  • Index Cond: ((ec1_4.id_coletor)::integer = (id_coletor)::integer)
99. 24.272 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)

100. 12.136 12.136 ↓ 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.001..0.001 rows=0 loops=12,136)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
  • Filter: (NOT vf_inicial)
  • Rows Removed by Filter: 0
101. 12.136 133.496 ↓ 0.0 0 12,136

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

102. 121.360 121.360 ↓ 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.010..0.010 rows=0 loops=12,136)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
103. 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)

104. 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)
105. 0.138 0.138 ↑ 1.0 1 23

Index Scan using pk00_tb_geometria on tb_geometria g_4 (cost=0.43..2.85 rows=1 width=43) (actual time=0.005..0.006 rows=1 loops=23)

  • Index Cond: ((id_geometria)::integer = (tv.id_local_clt)::integer)
106. 0.750 0.750 ↑ 1.0 1 150

Index Scan using pk00_tb_geometria on tb_geometria g_3 (cost=0.43..2.85 rows=1 width=43) (actual time=0.004..0.005 rows=1 loops=150)

  • Index Cond: ((id_geometria)::integer = (tv.id_local_clt)::integer)
107. 3.684 3.684 ↑ 1.0 1 921

Index Scan using pk00_tb_geometria on tb_geometria g_2 (cost=0.43..2.85 rows=1 width=43) (actual time=0.004..0.004 rows=1 loops=921)

  • Index Cond: ((id_geometria)::integer = (tv.id_local_clt)::integer)
108. 13.032 13.032 ↑ 1.0 1 2,172

Index Scan using pk00_tb_geometria on tb_geometria g_1 (cost=0.43..2.85 rows=1 width=43) (actual time=0.005..0.006 rows=1 loops=2,172)

  • Index Cond: ((id_geometria)::integer = (tv.id_local_clt)::integer)
109. 50.611 50.611 ↑ 1.0 1 4,601

Index Scan using pk00_tb_geometria on tb_geometria g (cost=0.43..2.85 rows=1 width=43) (actual time=0.011..0.011 rows=1 loops=4,601)

  • Index Cond: ((id_geometria)::integer = (tv.id_local_clt)::integer)
Planning time : 101.436 ms
Execution time : 118,869.874 ms