explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2Kq8

Settings
# exclusive inclusive rows x rows loops node
1. 5.765 8,901.329 ↑ 1.8 2,073 1

Sort (cost=1,553,403.93..1,553,413.12 rows=3,679 width=798) (actual time=8,901.088..8,901.329 rows=2,073 loops=1)

  • Sort Key: rd.dt_inicio_terminal
  • Sort Method: quicksort Memory: 1097kB
2. 5,517.013 8,895.564 ↑ 1.8 2,073 1

GroupAggregate (cost=29,924.68..1,553,186.04 rows=3,679 width=798) (actual time=218.356..8,895.564 rows=2,073 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. 35.633 216.861 ↓ 4.3 15,978 1

Sort (cost=29,924.68..29,933.88 rows=3,679 width=4,956) (actual time=212.986..216.861 rows=15,978 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: 8822kB
4. 5.288 181.228 ↓ 4.3 15,978 1

Nested Loop (cost=21,205.30..29,706.79 rows=3,679 width=4,956) (actual time=137.856..181.228 rows=15,978 loops=1)

5. 0.882 154.364 ↓ 3.0 5,394 1

Nested Loop (cost=21,204.86..28,227.72 rows=1,780 width=575) (actual time=137.820..154.364 rows=5,394 loops=1)

6. 0.566 145.190 ↓ 1.5 2,073 1

Hash Left Join (cost=21,204.43..24,390.71 rows=1,355 width=569) (actual time=137.804..145.190 rows=2,073 loops=1)

  • Hash Cond: ((rd.id_rd)::integer = (tb_refeicao.id_rd)::integer)
7. 0.520 85.488 ↓ 1.5 2,073 1

Hash Left Join (cost=10,777.08..13,959.80 rows=1,355 width=545) (actual time=78.650..85.488 rows=2,073 loops=1)

  • Hash Cond: ((rd.id_rd)::integer = (tb_sos.id_rd)::integer)
8. 0.631 11.098 ↓ 1.5 2,073 1

Hash Join (cost=342.28..3,521.45 rows=1,355 width=505) (actual time=4.770..11.098 rows=2,073 loops=1)

  • Hash Cond: ((rd.id_veiculo)::integer = (ve.id_veiculo)::integer)
9. 0.429 5.866 ↓ 1.5 2,073 1

Nested Loop (cost=0.43..3,176.04 rows=1,355 width=498) (actual time=0.089..5.866 rows=2,073 loops=1)

10. 0.010 0.010 ↑ 1.0 1 1

Seq Scan on tb_modelo_coleta mc (cost=0.00..1.29 rows=1 width=23) (actual time=0.006..0.010 rows=1 loops=1)

  • Filter: ((id_modelo_coleta)::integer = 1)
  • Rows Removed by Filter: 22
11. 5.427 5.427 ↓ 1.5 2,073 1

Index Scan using ind_tb_rd_idfilial_dtini_idveiculo_idrd on tb_rd rd (cost=0.43..3,161.20 rows=1,355 width=483) (actual time=0.081..5.427 rows=2,073 loops=1)

  • Index Cond: (((id_filial)::integer = 103) AND (dt_inicio_terminal >= '2019-08-01 00:00:00-03'::timestamp with time zone) AND (dt_inicio_terminal <= '2019-08-31 23:59:59-03'::timestamp with time zone))
  • Filter: ((id_modelo_coleta)::integer = 1)
  • Rows Removed by Filter: 2166
12. 2.597 4.601 ↓ 1.0 8,662 1

Hash (cost=233.60..233.60 rows=8,660 width=15) (actual time=4.601..4.601 rows=8,662 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 541kB
13. 2.004 2.004 ↓ 1.0 8,662 1

Seq Scan on tb_veiculo ve (cost=0.00..233.60 rows=8,660 width=15) (actual time=0.006..2.004 rows=8,662 loops=1)

14. 0.026 73.870 ↓ 10.4 125 1

Hash (cost=10,434.65..10,434.65 rows=12 width=44) (actual time=73.870..73.870 rows=125 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
15. 0.014 73.844 ↓ 10.4 125 1

Subquery Scan on tb_sos (cost=10,434.23..10,434.65 rows=12 width=44) (actual time=73.722..73.844 rows=125 loops=1)

16. 0.116 73.830 ↓ 10.4 125 1

GroupAggregate (cost=10,434.23..10,434.53 rows=12 width=44) (actual time=73.721..73.830 rows=125 loops=1)

  • Group Key: rd_1.id_rd
17. 0.073 73.714 ↓ 12.2 146 1

Sort (cost=10,434.23..10,434.26 rows=12 width=20) (actual time=73.706..73.714 rows=146 loops=1)

  • Sort Key: rd_1.id_rd
  • Sort Method: quicksort Memory: 36kB
18. 0.102 73.641 ↓ 12.2 146 1

Nested Loop (cost=2.01..10,434.01 rows=12 width=20) (actual time=0.715..73.641 rows=146 loops=1)

19. 0.691 73.247 ↓ 12.2 146 1

Nested Loop (cost=1.73..10,430.02 rows=12 width=24) (actual time=0.705..73.247 rows=146 loops=1)

  • Join Filter: ((o.id_modelo_ocorrencia)::integer = (mo.id_modelo_ocorrencia)::integer)
  • Rows Removed by Join Filter: 3901
20. 0.000 72.556 ↓ 20.0 599 1

Nested Loop (cost=1.73..10,425.34 rows=30 width=28) (actual time=0.089..72.556 rows=599 loops=1)

21. 3.191 41.101 ↓ 4.3 15,978 1

Nested Loop (cost=1.30..8,477.28 rows=3,679 width=12) (actual time=0.076..41.101 rows=15,978 loops=1)

22. 0.954 16.334 ↓ 3.0 5,394 1

Nested Loop (cost=0.86..6,998.21 rows=1,780 width=12) (actual time=0.063..16.334 rows=5,394 loops=1)

23. 5.015 5.015 ↓ 1.5 2,073 1

Index Scan using ind_tb_rd_idfilial_dtini_idveiculo_idrd on tb_rd rd_1 (cost=0.43..3,161.20 rows=1,355 width=8) (actual time=0.051..5.015 rows=2,073 loops=1)

  • Index Cond: (((id_filial)::integer = 103) AND (dt_inicio_terminal >= '2019-08-01 00:00:00-03'::timestamp with time zone) AND (dt_inicio_terminal <= '2019-08-31 23:59:59-03'::timestamp with time zone))
  • Filter: ((id_modelo_coleta)::integer = 1)
  • Rows Removed by Filter: 2166
24. 10.365 10.365 ↓ 1.5 3 2,073

Index Scan using ix01f_tb_viagem on tb_viagem v1 (cost=0.43..2.81 rows=2 width=8) (actual time=0.003..0.005 rows=3 loops=2,073)

  • Index Cond: ((id_rd)::integer = (rd_1.id_rd)::integer)
25. 21.576 21.576 ↑ 4.3 3 5,394

Index Scan using ix01f_tb_trecho_viagem on tb_trecho_viagem tv1 (cost=0.43..0.70 rows=13 width=8) (actual time=0.003..0.004 rows=3 loops=5,394)

  • Index Cond: ((id_viagem)::integer = (v1.id_viagem)::integer)
26. 31.956 31.956 ↓ 0.0 0 15,978

Index Scan using ix02f_tb_ocorrencia on tb_ocorrencia o (cost=0.43..0.52 rows=1 width=24) (actual time=0.002..0.002 rows=0 loops=15,978)

  • Index Cond: ((id_trecho_viagem)::integer = (tv1.id_trecho_viagem)::integer)
  • Filter: ((dt_inicio >= '2019-08-01 00:00:00-03'::timestamp with time zone) AND (dt_inicio <= '2019-08-31 23:59:59-03'::timestamp with time zone))
27. 0.000 0.000 ↑ 1.1 7 599

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

28. 0.004 0.004 ↑ 1.0 8 1

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

  • Filter: ((tp_ocorrencia)::smallint = 0)
  • Rows Removed by Filter: 12
29. 0.292 0.292 ↑ 1.0 1 146

Index Only Scan using pk00_tb_veiculo on tb_veiculo ve_1 (cost=0.29..0.33 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=146)

  • Index Cond: (id_veiculo = (rd_1.id_veiculo)::integer)
  • Heap Fetches: 5
30. 0.017 59.136 ↓ 42.0 42 1

Hash (cost=10,427.34..10,427.34 rows=1 width=28) (actual time=59.136..59.136 rows=42 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
31. 0.005 59.119 ↓ 42.0 42 1

Subquery Scan on tb_refeicao (cost=10,427.30..10,427.34 rows=1 width=28) (actual time=59.098..59.119 rows=42 loops=1)

32. 0.022 59.114 ↓ 42.0 42 1

GroupAggregate (cost=10,427.30..10,427.33 rows=1 width=28) (actual time=59.097..59.114 rows=42 loops=1)

  • Group Key: rd_2.id_rd
33. 0.023 59.092 ↓ 43.0 43 1

Sort (cost=10,427.30..10,427.31 rows=1 width=20) (actual time=59.089..59.092 rows=43 loops=1)

  • Sort Key: rd_2.id_rd
  • Sort Method: quicksort Memory: 28kB
34. 0.018 59.069 ↓ 43.0 43 1

Nested Loop (cost=2.01..10,427.29 rows=1 width=20) (actual time=2.410..59.069 rows=43 loops=1)

35. 0.056 58.965 ↓ 43.0 43 1

Nested Loop (cost=1.73..10,426.96 rows=1 width=24) (actual time=2.396..58.965 rows=43 loops=1)

  • Join Filter: ((o_1.id_modelo_ocorrencia)::integer = (mo_1.id_modelo_ocorrencia)::integer)
  • Rows Removed by Join Filter: 556
36. 0.009 0.009 ↑ 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.009 rows=1 loops=1)

  • Filter: ((tp_ocorrencia)::smallint = 2)
  • Rows Removed by Filter: 19
37. 9.173 58.900 ↓ 20.0 599 1

Nested Loop (cost=1.73..10,425.34 rows=30 width=28) (actual time=0.090..58.900 rows=599 loops=1)

38. 4.561 33.749 ↓ 4.3 15,978 1

Nested Loop (cost=1.30..8,477.28 rows=3,679 width=12) (actual time=0.075..33.749 rows=15,978 loops=1)

39. 2.450 13.006 ↓ 3.0 5,394 1

Nested Loop (cost=0.86..6,998.21 rows=1,780 width=12) (actual time=0.057..13.006 rows=5,394 loops=1)

40. 4.337 4.337 ↓ 1.5 2,073 1

Index Scan using ind_tb_rd_idfilial_dtini_idveiculo_idrd on tb_rd rd_2 (cost=0.43..3,161.20 rows=1,355 width=8) (actual time=0.047..4.337 rows=2,073 loops=1)

  • Index Cond: (((id_filial)::integer = 103) AND (dt_inicio_terminal >= '2019-08-01 00:00:00-03'::timestamp with time zone) AND (dt_inicio_terminal <= '2019-08-31 23:59:59-03'::timestamp with time zone))
  • Filter: ((id_modelo_coleta)::integer = 1)
  • Rows Removed by Filter: 2166
41. 6.219 6.219 ↓ 1.5 3 2,073

Index Scan using ix01f_tb_viagem on tb_viagem v1_1 (cost=0.43..2.81 rows=2 width=8) (actual time=0.002..0.003 rows=3 loops=2,073)

  • Index Cond: ((id_rd)::integer = (rd_2.id_rd)::integer)
42. 16.182 16.182 ↑ 4.3 3 5,394

Index Scan using ix01f_tb_trecho_viagem on tb_trecho_viagem tv1_1 (cost=0.43..0.70 rows=13 width=8) (actual time=0.002..0.003 rows=3 loops=5,394)

  • Index Cond: ((id_viagem)::integer = (v1_1.id_viagem)::integer)
43. 15.978 15.978 ↓ 0.0 0 15,978

Index Scan using ix02f_tb_ocorrencia on tb_ocorrencia o_1 (cost=0.43..0.52 rows=1 width=24) (actual time=0.001..0.001 rows=0 loops=15,978)

  • Index Cond: ((id_trecho_viagem)::integer = (tv1_1.id_trecho_viagem)::integer)
  • Filter: ((dt_inicio >= '2019-08-01 00:00:00-03'::timestamp with time zone) AND (dt_inicio <= '2019-08-31 23:59:59-03'::timestamp with time zone))
44. 0.086 0.086 ↑ 1.0 1 43

Index Only Scan using pk00_tb_veiculo on tb_veiculo ve_2 (cost=0.29..0.33 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=43)

  • Index Cond: (id_veiculo = (rd_2.id_veiculo)::integer)
  • Heap Fetches: 0
45. 8.292 8.292 ↓ 1.5 3 2,073

Index Scan using ix01f_tb_viagem on tb_viagem v (cost=0.43..2.81 rows=2 width=10) (actual time=0.002..0.004 rows=3 loops=2,073)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
46. 21.576 21.576 ↑ 4.3 3 5,394

Index Scan using ix01f_tb_trecho_viagem on tb_trecho_viagem tv (cost=0.43..0.70 rows=13 width=4,389) (actual time=0.002..0.004 rows=3 loops=5,394)

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

SubPlan (forGroupAggregate)

48. 22.803 2,920.857 ↑ 1.0 1 2,073

Aggregate (cost=302.95..302.96 rows=1 width=16) (actual time=1.409..1.409 rows=1 loops=2,073)

49. 12.438 2,898.054 ↑ 3.4 53 2,073

Append (cost=74.93..302.05 rows=181 width=16) (actual time=1.324..1.398 rows=53 loops=2,073)

50. 149.256 2,877.324 ↑ 1.3 53 2,073

Bitmap Heap Scan on tb_parada pa (cost=74.93..158.39 rows=69 width=16) (actual time=1.323..1.388 rows=53 loops=2,073)

  • Recheck Cond: ((id_rd)::integer = (rd.id_rd)::integer)
  • Heap Blocks: exact=104440
51. 2,728.068 2,728.068 ↑ 1.3 53 2,073

Bitmap Index Scan on ind_tb_parada_idrd_gin (cost=0.00..74.92 rows=69 width=0) (actual time=1.316..1.316 rows=53 loops=2,073)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
52. 2.073 8.292 ↓ 0.0 0 2,073

Bitmap Heap Scan on tb_parada_until_201810 pa_1 (cost=8.07..143.66 rows=112 width=16) (actual time=0.004..0.004 rows=0 loops=2,073)

  • Recheck Cond: ((id_rd)::integer = (rd.id_rd)::integer)
53. 6.219 6.219 ↓ 0.0 0 2,073

Bitmap Index Scan on ind_tb_tbparadau201810_idrd (cost=0.00..8.04 rows=112 width=0) (actual time=0.003..0.003 rows=0 loops=2,073)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
54. 10.365 72.555 ↑ 1.0 1 2,073

Limit (cost=17.30..17.30 rows=1 width=40) (actual time=0.034..0.035 rows=1 loops=2,073)

55. 10.365 62.190 ↑ 3.0 1 2,073

Sort (cost=17.30..17.30 rows=3 width=40) (actual time=0.030..0.030 rows=1 loops=2,073)

  • Sort Key: eq.dt_inicio
  • Sort Method: quicksort Memory: 25kB
56. 9.366 51.825 ↑ 3.0 1 2,073

Nested Loop Left Join (cost=1.15..17.28 rows=3 width=40) (actual time=0.020..0.025 rows=1 loops=2,073)

57. 5.968 35.241 ↑ 3.0 1 2,073

Nested Loop Left Join (cost=0.86..16.37 rows=3 width=12) (actual time=0.013..0.017 rows=1 loops=2,073)

58. 12.438 12.438 ↑ 3.0 1 2,073

Index Scan using ix03f_tb_equipe on tb_equipe eq (cost=0.43..2.88 rows=3 width=12) (actual time=0.006..0.006 rows=1 loops=2,073)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
59. 16.835 16.835 ↑ 1.0 1 2,405

Index Scan using pk00_tb_equipe_coletor on tb_equipe_coletor ec1 (cost=0.43..4.49 rows=1 width=8) (actual time=0.005..0.007 rows=1 loops=2,405)

  • Index Cond: ((eq.id_equipe)::integer = (id_equipe)::integer)
  • Filter: (vl_ordem = 1)
  • Rows Removed by Filter: 2
60. 7.218 7.218 ↑ 1.0 1 2,406

Index Scan using pk00_tb_coletor on tb_coletor c1 (cost=0.29..0.31 rows=1 width=28) (actual time=0.003..0.003 rows=1 loops=2,406)

  • Index Cond: ((ec1.id_coletor)::integer = (id_coletor)::integer)
61. 2.073 45.606 ↑ 1.0 1 2,073

Limit (cost=17.30..17.30 rows=1 width=40) (actual time=0.021..0.022 rows=1 loops=2,073)

62. 12.438 43.533 ↑ 3.0 1 2,073

Sort (cost=17.30..17.30 rows=3 width=40) (actual time=0.020..0.021 rows=1 loops=2,073)

  • Sort Key: eq_1.dt_inicio
  • Sort Method: quicksort Memory: 25kB
63. 3.482 31.095 ↑ 3.0 1 2,073

Nested Loop Left Join (cost=1.15..17.28 rows=3 width=40) (actual time=0.012..0.015 rows=1 loops=2,073)

64. 4.891 22.803 ↑ 3.0 1 2,073

Nested Loop Left Join (cost=0.86..16.37 rows=3 width=12) (actual time=0.008..0.011 rows=1 loops=2,073)

65. 8.292 8.292 ↑ 3.0 1 2,073

Index Scan using ix03f_tb_equipe on tb_equipe eq_1 (cost=0.43..2.88 rows=3 width=12) (actual time=0.004..0.004 rows=1 loops=2,073)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
66. 9.620 9.620 ↑ 1.0 1 2,405

Index Scan using pk00_tb_equipe_coletor on tb_equipe_coletor ec1_1 (cost=0.43..4.49 rows=1 width=8) (actual time=0.003..0.004 rows=1 loops=2,405)

  • Index Cond: ((eq_1.id_equipe)::integer = (id_equipe)::integer)
  • Filter: (vl_ordem = 2)
  • Rows Removed by Filter: 3
67. 4.810 4.810 ↑ 1.0 1 2,405

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=2,405)

  • Index Cond: ((ec1_1.id_coletor)::integer = (id_coletor)::integer)
68. 2.073 29.022 ↑ 1.0 1 2,073

Limit (cost=17.30..17.30 rows=1 width=40) (actual time=0.013..0.014 rows=1 loops=2,073)

69. 2.073 26.949 ↑ 3.0 1 2,073

Sort (cost=17.30..17.30 rows=3 width=40) (actual time=0.013..0.013 rows=1 loops=2,073)

  • Sort Key: eq_2.dt_inicio
  • Sort Method: quicksort Memory: 25kB
70. 3.482 24.876 ↑ 3.0 1 2,073

Nested Loop Left Join (cost=1.15..17.28 rows=3 width=40) (actual time=0.009..0.012 rows=1 loops=2,073)

71. 5.223 16.584 ↑ 3.0 1 2,073

Nested Loop Left Join (cost=0.86..16.37 rows=3 width=12) (actual time=0.006..0.008 rows=1 loops=2,073)

72. 4.146 4.146 ↑ 3.0 1 2,073

Index Scan using ix03f_tb_equipe on tb_equipe eq_2 (cost=0.43..2.88 rows=3 width=12) (actual time=0.002..0.002 rows=1 loops=2,073)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
73. 7.215 7.215 ↑ 1.0 1 2,405

Index Scan using pk00_tb_equipe_coletor on tb_equipe_coletor ec1_2 (cost=0.43..4.49 rows=1 width=8) (actual time=0.002..0.003 rows=1 loops=2,405)

  • Index Cond: ((eq_2.id_equipe)::integer = (id_equipe)::integer)
  • Filter: (vl_ordem = 3)
  • Rows Removed by Filter: 3
74. 4.810 4.810 ↑ 1.0 1 2,405

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=2,405)

  • Index Cond: ((ec1_2.id_coletor)::integer = (id_coletor)::integer)
75. 2.073 33.168 ↑ 1.0 1 2,073

Limit (cost=17.30..17.30 rows=1 width=40) (actual time=0.015..0.016 rows=1 loops=2,073)

76. 4.146 31.095 ↑ 3.0 1 2,073

Sort (cost=17.30..17.30 rows=3 width=40) (actual time=0.015..0.015 rows=1 loops=2,073)

  • Sort Key: eq_3.dt_inicio
  • Sort Method: quicksort Memory: 25kB
77. 7.628 26.949 ↑ 3.0 1 2,073

Nested Loop Left Join (cost=1.15..17.28 rows=3 width=40) (actual time=0.012..0.013 rows=1 loops=2,073)

78. 3.150 14.511 ↑ 3.0 1 2,073

Nested Loop Left Join (cost=0.86..16.37 rows=3 width=12) (actual time=0.006..0.007 rows=1 loops=2,073)

79. 4.146 4.146 ↑ 3.0 1 2,073

Index Scan using ix03f_tb_equipe on tb_equipe eq_3 (cost=0.43..2.88 rows=3 width=12) (actual time=0.002..0.002 rows=1 loops=2,073)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
80. 7.215 7.215 ↑ 1.0 1 2,405

Index Scan using pk00_tb_equipe_coletor on tb_equipe_coletor ec1_3 (cost=0.43..4.49 rows=1 width=8) (actual time=0.002..0.003 rows=1 loops=2,405)

  • Index Cond: ((eq_3.id_equipe)::integer = (id_equipe)::integer)
  • Filter: (vl_ordem = 4)
  • Rows Removed by Filter: 3
81. 4.810 4.810 ↑ 1.0 1 2,405

Index Scan using pk00_tb_coletor on tb_coletor c1_3 (cost=0.29..0.31 rows=1 width=28) (actual time=0.002..0.002 rows=1 loops=2,405)

  • Index Cond: ((ec1_3.id_coletor)::integer = (id_coletor)::integer)
82. 4.146 24.876 ↑ 1.0 1 2,073

Limit (cost=17.30..17.31 rows=1 width=40) (actual time=0.011..0.012 rows=1 loops=2,073)

83. 2.073 20.730 ↑ 3.0 1 2,073

Sort (cost=17.30..17.31 rows=3 width=40) (actual time=0.010..0.010 rows=1 loops=2,073)

  • Sort Key: eq_4.dt_inicio
  • Sort Method: quicksort Memory: 25kB
84. 1.741 18.657 ↑ 3.0 1 2,073

Nested Loop Left Join (cost=1.15..17.29 rows=3 width=40) (actual time=0.008..0.009 rows=1 loops=2,073)

85. 3.150 14.511 ↑ 3.0 1 2,073

Nested Loop Left Join (cost=0.86..16.37 rows=3 width=12) (actual time=0.006..0.007 rows=1 loops=2,073)

86. 4.146 4.146 ↑ 3.0 1 2,073

Index Scan using ix03f_tb_equipe on tb_equipe eq_4 (cost=0.43..2.88 rows=3 width=12) (actual time=0.002..0.002 rows=1 loops=2,073)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
87. 7.215 7.215 ↓ 0.0 0 2,405

Index Scan using pk00_tb_equipe_coletor on tb_equipe_coletor ec1_4 (cost=0.43..4.49 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=2,405)

  • Index Cond: ((eq_4.id_equipe)::integer = (id_equipe)::integer)
  • Filter: (vl_ordem = 5)
  • Rows Removed by Filter: 3
88. 2.405 2.405 ↓ 0.0 0 2,405

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=2,405)

  • Index Cond: ((ec1_4.id_coletor)::integer = (id_coletor)::integer)
89. 2.073 6.219 ↓ 0.0 0 2,073

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

90. 4.146 4.146 ↓ 0.0 0 2,073

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=2,073)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
  • Filter: (NOT vf_inicial)
  • Rows Removed by Filter: 1
91. 2.073 10.365 ↓ 0.0 0 2,073

Limit (cost=0.42..2.84 rows=1 width=5) (actual time=0.004..0.005 rows=0 loops=2,073)

92. 8.292 8.292 ↓ 0.0 0 2,073

Index Scan using ix00f_tb_abastecimento on tb_abastecimento (cost=0.42..2.84 rows=1 width=5) (actual time=0.004..0.004 rows=0 loops=2,073)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
93. 0.000 4.146 ↓ 0.0 0 2,073

Limit (cost=0.42..2.84 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=2,073)

94. 4.146 4.146 ↓ 0.0 0 2,073

Index Scan using ix00f_tb_abastecimento on tb_abastecimento tb_abastecimento_1 (cost=0.42..2.84 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=2,073)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
95. 0.000 0.000 ↓ 0.0 0

Index Scan using pk00_tb_geometria on tb_geometria g_4 (cost=0.43..2.85 rows=1 width=44) (never executed)

  • Index Cond: ((id_geometria)::integer = (tv.id_local_clt)::integer)
96. 0.016 0.016 ↑ 1.0 1 2

Index Scan using pk00_tb_geometria on tb_geometria g_3 (cost=0.43..2.85 rows=1 width=44) (actual time=0.008..0.008 rows=1 loops=2)

  • Index Cond: ((id_geometria)::integer = (tv.id_local_clt)::integer)
97. 0.820 0.820 ↑ 1.0 1 205

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

  • Index Cond: ((id_geometria)::integer = (tv.id_local_clt)::integer)
98. 5.076 5.076 ↑ 1.0 1 1,269

Index Scan using pk00_tb_geometria on tb_geometria g_1 (cost=0.43..2.85 rows=1 width=44) (actual time=0.003..0.004 rows=1 loops=1,269)

  • Index Cond: ((id_geometria)::integer = (tv.id_local_clt)::integer)
99. 8.964 8.964 ↑ 1.0 1 2,241

Index Scan using pk00_tb_geometria on tb_geometria g (cost=0.43..2.85 rows=1 width=44) (actual time=0.004..0.004 rows=1 loops=2,241)

  • Index Cond: ((id_geometria)::integer = (tv.id_local_clt)::integer)
Planning time : 16.005 ms
Execution time : 8,906.188 ms