explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7KdE

Settings
# exclusive inclusive rows x rows loops node
1. 22.690 58,944.576 ↑ 2.1 12,136 1

Sort (cost=5,244,871.85..5,244,934.88 rows=25,213 width=764) (actual time=58,943.000..58,944.576 rows=12,136 loops=1)

  • Sort Key: rd.dt_inicio_terminal
  • Sort Method: quicksort Memory: 4,320kB
2. 38,325.803 58,921.886 ↑ 2.1 12,136 1

GroupAggregate (cost=2,647,666.05..5,243,028.54 rows=25,213 width=764) (actual time=19,532.194..58,921.886 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. 1,224.430 19,818.453 ↓ 13.9 351,639 1

Sort (cost=2,647,666.05..2,647,729.08 rows=25,213 width=624) (actual time=19,531.375..19,818.453 rows=351,639 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: 113,464kB
4. 86.187 18,594.023 ↓ 13.9 351,639 1

Nested Loop Left Join (cost=90,179.71..2,645,822.74 rows=25,213 width=624) (actual time=588.617..18,594.023 rows=351,639 loops=1)

  • Join Filter: (((rd.id_rd)::integer = (pa.id_rd)::integer) AND ((pa.id_veiculo)::integer = (rd.id_veiculo)::integer))
5. 10.385 859.867 ↓ 1.5 38,617 1

Nested Loop (cost=90,167.96..158,197.27 rows=25,213 width=632) (actual time=577.039..859.867 rows=38,617 loops=1)

6. 22.732 688.157 ↓ 1.5 17,925 1

Nested Loop (cost=90,167.53..120,316.28 rows=12,169 width=575) (actual time=577.005..688.157 rows=17,925 loops=1)

7. 6.863 629.017 ↓ 1.3 12,136 1

Hash Left Join (cost=90,167.10..96,918.81 rows=9,133 width=569) (actual time=576.979..629.017 rows=12,136 loops=1)

  • Hash Cond: ((rd.id_rd)::integer = (tb_refeicao.id_rd)::integer)
8. 4.565 491.188 ↓ 1.3 12,136 1

Hash Left Join (cost=52,941.34..59,669.08 rows=9,133 width=545) (actual time=445.997..491.188 rows=12,136 loops=1)

  • Hash Cond: ((rd.id_rd)::integer = (tb_sos.id_rd)::integer)
9. 6.775 45.948 ↓ 1.3 12,136 1

Hash Join (cost=424.31..7,128.07 rows=9,133 width=505) (actual time=5.304..45.948 rows=12,136 loops=1)

  • Hash Cond: ((rd.id_veiculo)::integer = (ve.id_veiculo)::integer)
10. 6.646 34.034 ↓ 1.3 12,136 1

Hash Join (cost=2.00..6,681.77 rows=9,133 width=495) (actual time=0.082..34.034 rows=12,136 loops=1)

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

Index Scan using ind_tb_rd_idfilial_dtini_idveiculo_idrd on tb_rd rd (cost=0.43..6,652.17 rows=9,133 width=479) (actual time=0.048..27.370 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))
12. 0.010 0.018 ↑ 1.0 25 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
13. 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.003..0.008 rows=25 loops=1)

14. 2.742 5.139 ↓ 1.0 10,327 1

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

  • Buckets: 16,384 Batches: 1 Memory Usage: 620kB
15. 2.397 2.397 ↓ 1.0 10,327 1

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

16. 0.043 440.675 ↓ 2.3 97 1

Hash (cost=52,516.51..52,516.51 rows=42 width=44) (actual time=440.675..440.675 rows=97 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 14kB
17. 0.016 440.632 ↓ 2.3 97 1

Subquery Scan on tb_sos (cost=52,515.04..52,516.51 rows=42 width=44) (actual time=440.456..440.632 rows=97 loops=1)

18. 0.166 440.616 ↓ 2.3 97 1

GroupAggregate (cost=52,515.04..52,516.09 rows=42 width=44) (actual time=440.455..440.616 rows=97 loops=1)

  • Group Key: rd_1.id_rd
19. 0.127 440.450 ↓ 2.8 117 1

Sort (cost=52,515.04..52,515.15 rows=42 width=20) (actual time=440.436..440.450 rows=117 loops=1)

  • Sort Key: rd_1.id_rd
  • Sort Method: quicksort Memory: 34kB
20. 0.287 440.323 ↓ 2.8 117 1

Nested Loop (cost=2.00..52,513.91 rows=42 width=20) (actual time=0.701..440.323 rows=117 loops=1)

21. 26.983 439.568 ↓ 2.8 117 1

Nested Loop (cost=1.72..52,500.95 rows=42 width=24) (actual time=0.686..439.568 rows=117 loops=1)

  • Join Filter: ((o.id_modelo_ocorrencia)::integer = (mo.id_modelo_ocorrencia)::integer)
  • Rows Removed by Join Filter: 285,309
22. 36.516 376.830 ↓ 340.5 35,755 1

Nested Loop (cost=1.72..52,487.55 rows=105 width=28) (actual time=0.365..376.830 rows=35,755 loops=1)

23. 16.246 224.463 ↓ 1.5 38,617 1

Nested Loop (cost=1.29..37,420.33 rows=25,213 width=12) (actual time=0.072..224.463 rows=38,617 loops=1)

24. 11.896 64.817 ↓ 1.5 17,925 1

Nested Loop (cost=0.86..23,721.70 rows=12,169 width=12) (actual time=0.054..64.817 rows=17,925 loops=1)

25. 4.377 4.377 ↓ 1.3 12,136 1

Index Only Scan using ind_tb_rd_idfilial_dtini_idveiculo_idrd on tb_rd rd_1 (cost=0.43..324.23 rows=9,133 width=8) (actual time=0.037..4.377 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: 228
26. 48.544 48.544 ↑ 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.003..0.004 rows=1 loops=12,136)

  • Index Cond: ((id_rd)::integer = (rd_1.id_rd)::integer)
27. 35.850 143.400 ↑ 3.5 2 17,925

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

28. 71.700 71.700 ↑ 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.003..0.004 rows=2 loops=17,925)

  • Index Cond: ((id_viagem)::integer = (v1.id_viagem)::integer)
29. 35.850 35.850 ↓ 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.002..0.002 rows=0 loops=17,925)

  • Index Cond: ((id_viagem)::integer = (v1.id_viagem)::integer)
30. 115.851 115.851 ↑ 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.002..0.003 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
31. 35.749 35.755 ↑ 1.0 8 35,755

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

32. 0.006 0.006 ↑ 1.0 8 1

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

  • Filter: ((tp_ocorrencia)::smallint = 0)
  • Rows Removed by Filter: 12
33. 0.468 0.468 ↑ 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.004..0.004 rows=1 loops=117)

  • Index Cond: (id_veiculo = (rd_1.id_veiculo)::integer)
  • Heap Fetches: 24
34. 0.462 130.966 ↓ 318.4 1,592 1

Hash (cost=37,225.69..37,225.69 rows=5 width=28) (actual time=130.965..130.966 rows=1,592 loops=1)

  • Buckets: 2,048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 110kB
35. 0.252 130.504 ↓ 318.4 1,592 1

Subquery Scan on tb_refeicao (cost=37,225.53..37,225.69 rows=5 width=28) (actual time=129.080..130.504 rows=1,592 loops=1)

36. 1.023 130.252 ↓ 318.4 1,592 1

GroupAggregate (cost=37,225.53..37,225.64 rows=5 width=28) (actual time=129.079..130.252 rows=1,592 loops=1)

  • Group Key: rd_2.id_rd
37. 0.986 129.229 ↓ 323.8 1,619 1

Sort (cost=37,225.53..37,225.54 rows=5 width=20) (actual time=129.066..129.229 rows=1,619 loops=1)

  • Sort Key: rd_2.id_rd
  • Sort Method: quicksort Memory: 175kB
38. 1.665 128.243 ↓ 323.8 1,619 1

Nested Loop (cost=461.70..37,225.47 rows=5 width=20) (actual time=21.317..128.243 rows=1,619 loops=1)

39. 2.549 123.340 ↓ 323.8 1,619 1

Hash Join (cost=461.41..37,223.93 rows=5 width=24) (actual time=21.291..123.340 rows=1,619 loops=1)

  • Hash Cond: ((v1_1.id_rd)::integer = (rd_2.id_rd)::integer)
40. 9.566 114.179 ↓ 2.1 6,027 1

Nested Loop (cost=23.03..36,777.82 rows=2,939 width=20) (actual time=13.560..114.179 rows=6,027 loops=1)

41. 5.679 86.532 ↓ 2.1 6,027 1

Nested Loop (cost=22.59..35,437.27 rows=2,939 width=20) (actual time=13.545..86.532 rows=6,027 loops=1)

42. 7.568 38.664 ↓ 2.1 6,027 1

Hash Join (cost=22.17..26,582.93 rows=2,939 width=20) (actual time=13.515..38.664 rows=6,027 loops=1)

  • Hash Cond: ((o_1.id_modelo_ocorrencia)::integer = (mo_1.id_modelo_ocorrencia)::integer)
43. 30.787 31.084 ↑ 1.1 55,752 1

Bitmap Heap Scan on tb_ocorrencia o_1 (cost=20.90..26,394.66 rows=58,785 width=24) (actual time=12.286..31.084 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,063
  • Heap Blocks: lossy=2,001
44. 0.297 0.297 ↑ 2.9 20,160 1

Bitmap Index Scan on ind_tb_ocorrencia_dtinicio (cost=0.00..6.21 rows=58,984 width=0) (actual time=0.297..0.297 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))
45. 0.004 0.012 ↑ 1.0 1 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
46. 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.005..0.008 rows=1 loops=1)

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

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

48. 24.108 24.108 ↑ 1.0 1 6,027

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

  • Index Cond: ((id_trecho_viagem)::integer = (o_1.id_trecho_viagem)::integer)
49. 12.054 12.054 ↓ 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.002..0.002 rows=0 loops=6,027)

  • Index Cond: ((id_trecho_viagem)::integer = (o_1.id_trecho_viagem)::integer)
50. 18.081 18.081 ↑ 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.003..0.003 rows=1 loops=6,027)

  • Index Cond: ((id_viagem)::integer = (tv1_2.id_viagem)::integer)
51. 2.791 6.612 ↓ 1.3 12,136 1

Hash (cost=324.23..324.23 rows=9,133 width=8) (actual time=6.612..6.612 rows=12,136 loops=1)

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

Index Only Scan using ind_tb_rd_idfilial_dtini_idveiculo_idrd on tb_rd rd_2 (cost=0.43..324.23 rows=9,133 width=8) (actual time=0.039..3.821 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: 228
53. 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: 306
54. 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.003..0.003 rows=1 loops=12,136)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
55. 35.850 161.325 ↑ 3.5 2 17,925

Append (cost=0.43..3.04 rows=7 width=65) (actual time=0.004..0.009 rows=2 loops=17,925)

56. 89.625 89.625 ↑ 1.5 2 17,925

Index Scan using ix01f_tb_trecho_viagem on tb_trecho_viagem tv (cost=0.43..1.48 rows=3 width=120) (actual time=0.003..0.005 rows=2 loops=17,925)

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

Index Scan using ix01f_tbtrechoviagemu20191111 on tb_trecho_viagem_clust_until_20191111 tv_1 (cost=0.43..1.53 rows=4 width=58) (actual time=0.002..0.002 rows=0 loops=17,925)

  • Index Cond: ((id_viagem)::integer = (v.id_viagem)::integer)
58. 38.617 17,647.969 ↑ 16.6 9 38,617

Append (cost=11.75..96.43 rows=149 width=12) (actual time=0.447..0.457 rows=9 loops=38,617)

59. 424.787 17,454.884 ↑ 7.8 9 38,617

Bitmap Heap Scan on tb_parada pa (cost=11.75..48.58 rows=70 width=12) (actual time=0.445..0.452 rows=9 loops=38,617)

  • Recheck Cond: ((id_trecho_viagem)::integer = (tv.id_trecho_viagem)::integer)
  • Heap Blocks: exact=328,862
60. 17,030.097 17,030.097 ↑ 7.8 9 38,617

Bitmap Index Scan on ind_tb_parada_idtrechoviagem (cost=0.00..11.73 rows=70 width=0) (actual time=0.441..0.441 rows=9 loops=38,617)

  • Index Cond: ((id_trecho_viagem)::integer = (tv.id_trecho_viagem)::integer)
61. 38.617 154.468 ↓ 0.0 0 38,617

Bitmap Heap Scan on tb_parada_until_201810 pa_1 (cost=4.15..47.10 rows=79 width=12) (actual time=0.004..0.004 rows=0 loops=38,617)

  • Recheck Cond: ((id_trecho_viagem)::integer = (tv.id_trecho_viagem)::integer)
62. 115.851 115.851 ↓ 0.0 0 38,617

Bitmap Index Scan on ind_tb_tbparadau201810_id_trecho_viagem (cost=0.00..4.13 rows=79 width=0) (actual time=0.003..0.003 rows=0 loops=38,617)

  • Index Cond: ((id_trecho_viagem)::integer = (tv.id_trecho_viagem)::integer)
63.          

SubPlan (for GroupAggregate)

64. 12.136 145.632 ↓ 0.0 0 12,136

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

65. 24.272 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.dt_inicio
  • Sort Method: quicksort Memory: 25kB
66. 4.982 109.224 ↓ 0.0 0 12,136

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

67. 27.082 97.088 ↓ 0.0 0 12,136

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

68. 48.544 48.544 ↓ 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.004..0.004 rows=0 loops=12,136)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
69. 21.462 21.462 ↑ 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.005..0.006 rows=1 loops=3,577)

  • Index Cond: ((eq.id_equipe)::integer = (id_equipe)::integer)
  • Filter: (vl_ordem = 1)
  • Rows Removed by Filter: 2
70. 7.154 7.154 ↑ 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.002..0.002 rows=1 loops=3,577)

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

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

72. 12.136 72.816 ↓ 0.0 0 12,136

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

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

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

74. 13.541 48.544 ↓ 0.0 0 12,136

Nested Loop Left Join (cost=0.86..14.74 rows=3 width=12) (actual time=0.004..0.004 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.001..0.002 rows=0 loops=12,136)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
76. 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.002..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
77. 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)
78. 0.000 72.816 ↓ 0.0 0 12,136

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

79. 12.136 72.816 ↓ 0.0 0 12,136

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

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

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

81. 29.254 48.544 ↓ 0.0 0 12,136

Nested Loop Left Join (cost=0.86..14.74 rows=3 width=12) (actual time=0.003..0.004 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. 7.154 7.154 ↑ 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.002 rows=1 loops=3,577)

  • Index Cond: ((eq_2.id_equipe)::integer = (id_equipe)::integer)
  • Filter: (vl_ordem = 3)
  • Rows Removed by Filter: 2
84. 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)
85. 12.136 72.816 ↓ 0.0 0 12,136

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

86. 0.000 60.680 ↓ 0.0 0 12,136

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

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

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

88. 29.254 48.544 ↓ 0.0 0 12,136

Nested Loop Left Join (cost=0.86..14.74 rows=3 width=12) (actual time=0.003..0.004 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. 7.154 7.154 ↓ 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.002 rows=0 loops=3,577)

  • Index Cond: ((eq_3.id_equipe)::integer = (id_equipe)::integer)
  • Filter: (vl_ordem = 4)
  • Rows Removed by Filter: 2
91. 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)
92. 12.136 72.816 ↓ 0.0 0 12,136

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

93. 12.136 60.680 ↓ 0.0 0 12,136

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

  • Sort Key: eq_4.dt_inicio
  • Sort Method: quicksort Memory: 25kB
94. 0.000 48.544 ↓ 0.0 0 12,136

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

95. 29.254 48.544 ↓ 0.0 0 12,136

Nested Loop Left Join (cost=0.86..14.74 rows=3 width=12) (actual time=0.003..0.004 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.154 7.154 ↓ 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.002..0.002 rows=0 loops=3,577)

  • Index Cond: ((eq_4.id_equipe)::integer = (id_equipe)::integer)
  • Filter: (vl_ordem = 5)
  • Rows Removed by Filter: 3
98. 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)
99. 12.136 24.272 ↓ 0.0 0 12,136

Limit (cost=0.43..2.88 rows=1 width=1) (actual time=0.002..0.002 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. 24.272 48.544 ↓ 0.0 0 12,136

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

102. 24.272 24.272 ↓ 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.002..0.002 rows=0 loops=12,136)

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

Limit (cost=0.42..2.84 rows=1 width=4) (actual time=0.002..0.002 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.176 0.176 ↑ 1.0 1 88

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=88)

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

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=550)

  • Index Cond: ((id_geometria)::integer = (tv.id_local_clt)::integer)
107. 7.400 7.400 ↑ 1.0 1 3,700

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=3,700)

  • Index Cond: ((id_geometria)::integer = (tv.id_local_clt)::integer)
108. 49.830 49.830 ↑ 1.0 1 24,915

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=24,915)

  • Index Cond: ((id_geometria)::integer = (tv.id_local_clt)::integer)
109. 185.140 185.140 ↑ 1.0 1 92,570

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=92,570)

  • Index Cond: ((id_geometria)::integer = (tv.id_local_clt)::integer)
Planning time : 17.068 ms
Execution time : 58,968.103 ms