explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BVdY

Settings
# exclusive inclusive rows x rows loops node
1. 0.908 2.290 ↓ 0.0 0 1

Nested Loop (cost=51.54..421.30 rows=1 width=24) (actual time=2.290..2.290 rows=0 loops=1)

  • Join Filter: (ve.id_evento = a.id_evento)
2. 0.006 0.274 ↓ 2.0 2 1

Nested Loop (cost=18.63..387.17 rows=1 width=32) (actual time=0.186..0.274 rows=2 loops=1)

3. 0.007 0.244 ↑ 2.5 2 1

Nested Loop (cost=16.94..377.10 rows=5 width=55) (actual time=0.168..0.244 rows=2 loops=1)

4. 0.003 0.169 ↑ 1.5 2 1

Nested Loop (cost=13.56..348.76 rows=3 width=47) (actual time=0.113..0.169 rows=2 loops=1)

5. 0.008 0.124 ↑ 14.0 3 1

Nested Loop (cost=10.97..221.03 rows=42 width=4) (actual time=0.089..0.124 rows=3 loops=1)

6. 0.010 0.060 ↑ 3.5 2 1

Bitmap Heap Scan on syo_veiculo veic (cost=7.64..15.96 rows=7 width=12) (actual time=0.056..0.060 rows=2 loops=1)

  • Recheck Cond: ((no_chassi = '9BGJD7520LB103094'::text) OR (ds_placa = 'ERD0309'::text))
  • Heap Blocks: exact=2
7. 0.000 0.050 ↓ 0.0 0 1

BitmapOr (cost=7.64..7.64 rows=7 width=0) (actual time=0.050..0.050 rows=0 loops=1)

8. 0.020 0.020 ↑ 4.0 1 1

Bitmap Index Scan on syo_veiculo_no_chassi (cost=0.00..3.83 rows=4 width=0) (actual time=0.020..0.020 rows=1 loops=1)

  • Index Cond: (no_chassi = '9BGJD7520LB103094'::text)
9. 0.030 0.030 ↓ 2.0 6 1

Bitmap Index Scan on syo_veiculo_ds_placa (cost=0.00..3.79 rows=3 width=0) (actual time=0.030..0.030 rows=6 loops=1)

  • Index Cond: (ds_placa = 'ERD0309'::text)
10. 0.056 0.056 ↑ 10.0 2 2

Index Scan using fk_syo_veiculoevento on syo_veiculoevento ve (cost=3.33..28.10 rows=20 width=19) (actual time=0.025..0.028 rows=2 loops=2)

  • Index Cond: (id_veiculo = veic.id_veiculo)
11. 0.042 0.042 ↑ 1.0 1 3

Index Scan using pk_syo_evento on syo_evento e (cost=2.59..2.98 rows=1 width=43) (actual time=0.014..0.014 rows=1 loops=3)

  • Index Cond: (id_evento = ve.id_evento)
  • Filter: ((id_grupoevento = 'AGENDAMENTO'::text) AND (id_statusevento = 'CONCLUIDO'::text))
  • Rows Removed by Filter: 0
12. 0.068 0.068 ↑ 33.0 1 2

Index Only Scan using syo_lista_eventos_agente on syo_encaminhamento en (cost=3.38..7.47 rows=33 width=8) (actual time=0.033..0.034 rows=1 loops=2)

  • Index Cond: ((id_evento = ve.id_evento) AND (id_statusagenteativo = 'S'::text))
  • Heap Fetches: 2
13. 0.024 0.024 ↑ 1.0 1 2

Index Scan using syo_tipoevento_select on syo_tipoevento tp (cost=1.70..1.95 rows=1 width=33) (actual time=0.011..0.012 rows=1 loops=2)

  • Index Cond: ((id_grupoevento = 'AGENDAMENTO'::text) AND (id_tipoevento = e.id_tipoevento) AND (id_empresa = en.id_empresa))
14. 0.000 1.108 ↓ 0.0 0 2

Index Scan using pk_syo_acao on syo_acao a (cost=32.91..34.05 rows=1 width=8) (actual time=0.554..0.554 rows=0 loops=2)

  • Index Cond: (id_acao = (SubPlan 1))
  • Filter: ((ds_resultado = 'INSUCESSO'::text) AND (e.id_evento = id_evento))
  • Rows Removed by Filter: 1
15.          

SubPlan (forIndex Scan)

16. 0.008 0.900 ↑ 1.0 1 2

Aggregate (cost=30.22..30.28 rows=1 width=4) (actual time=0.450..0.450 rows=1 loops=2)

17. 0.892 0.892 ↑ 10.0 1 2

Index Scan using fk_acao_evento2 on syo_acao (cost=2.62..30.07 rows=10 width=4) (actual time=0.446..0.446 rows=1 loops=2)

  • Index Cond: (id_evento = e.id_evento)
  • Filter: (tp_acao <> 'ENCAMINHAMENTO'::text)
18. 0.008 0.900 ↑ 1.0 1 2

Aggregate (cost=30.22..30.28 rows=1 width=4) (actual time=0.450..0.450 rows=1 loops=2)

19. 0.892 0.892 ↑ 10.0 1 2

Index Scan using fk_acao_evento2 on syo_acao (cost=2.62..30.07 rows=10 width=4) (actual time=0.446..0.446 rows=1 loops=2)

  • Index Cond: (id_evento = e.id_evento)
  • Filter: (tp_acao <> 'ENCAMINHAMENTO'::text)
Planning time : 13.223 ms
Execution time : 2.610 ms