explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9iak

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 1,213.815 ↓ 0.0 0 1

Nested Loop (cost=27.52..576,556.59 rows=1 width=24) (actual time=1,213.815..1,213.815 rows=0 loops=1)

  • Join Filter: ((ve.id_evento = a.id_evento) AND ((SubPlan 1) = a.id_acao))
2. 0.021 1,213.771 ↓ 2.0 2 1

Nested Loop (cost=24.15..576,461.07 rows=1 width=32) (actual time=1,200.765..1,213.771 rows=2 loops=1)

3. 0.019 1,213.708 ↑ 2.5 2 1

Nested Loop (cost=22.45..576,451.00 rows=5 width=55) (actual time=1,200.721..1,213.708 rows=2 loops=1)

4. 0.015 1,213.653 ↑ 1.5 2 1

Nested Loop (cost=19.08..576,422.66 rows=3 width=47) (actual time=1,200.688..1,213.653 rows=2 loops=1)

5. 754.986 1,213.554 ↑ 14.0 3 1

Hash Join (cost=16.48..576,294.93 rows=42 width=4) (actual time=1,200.657..1,213.554 rows=3 loops=1)

  • Hash Cond: (ve.id_veiculo = veic.id_veiculo)
6. 458.468 458.468 ↓ 1.0 4,116,506 1

Seq Scan on syo_veiculoevento ve (cost=0.00..298,532.26 rows=4,114,721 width=19) (actual time=0.015..458.468 rows=4,116,506 loops=1)

7. 0.005 0.100 ↑ 3.5 2 1

Hash (cost=15.96..15.96 rows=7 width=12) (actual time=0.100..0.100 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
8. 0.016 0.095 ↑ 3.5 2 1

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

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

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

10. 0.032 0.032 ↑ 4.0 1 1

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

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

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

  • Index Cond: (ds_placa = 'ERD0309'::text)
12. 0.084 0.084 ↑ 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.028..0.028 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
13. 0.036 0.036 ↑ 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.018..0.018 rows=1 loops=2)

  • Index Cond: ((id_evento = ve.id_evento) AND (id_statusagenteativo = 'S'::text))
  • Heap Fetches: 2
14. 0.042 0.042 ↑ 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.021..0.021 rows=1 loops=2)

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

Index Scan using fk_acao_evento on syo_acao a (cost=3.38..4.40 rows=3 width=8) (actual time=0.018..0.018 rows=0 loops=2)

  • Index Cond: ((id_evento = en.id_evento) AND (ds_resultado = 'INSUCESSO'::text))
16.          

SubPlan (forNested Loop)

17. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=30.22..30.28 rows=1 width=4) (never executed)

18. 0.000 0.000 ↓ 0.0 0

Index Scan using fk_acao_evento2 on syo_acao (cost=2.62..30.07 rows=10 width=4) (never executed)

  • Index Cond: (id_evento = e.id_evento)
  • Filter: (tp_acao <> 'ENCAMINHAMENTO'::text)
Planning time : 10.486 ms
Execution time : 1,214.120 ms