explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AmBE

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

Sort (cost=132,365.20..132,365.22 rows=7 width=265) (actual time=0.055..0.056 rows=0 loops=1)

  • Sort Key: traslado.hora_inicio_esperada
  • Sort Method: quicksort Memory: 25kB
  • Planning time: 1.820 ms
  • Execution time: 0.219 ms
2. 0.002 0.048 ↓ 0.0 0 1

Merge Left Join (cost=132,364.59..132,365.10 rows=7 width=265) (actual time=0.047..0.048 rows=0 loops=1)

  • Merge Cond: (traslado.id_tras = eventos_1.id_tras)
  • Join Filter: (rel_hrut_tras.id_hrut = eventos_1.id_hrut)
3. 0.000 0.046 ↓ 0.0 0 1

Merge Left Join (cost=66,231.38..66,231.54 rows=7 width=215) (actual time=0.046..0.046 rows=0 loops=1)

  • Merge Cond: (traslado.id_tras = eventos.id_tras)
  • Join Filter: (rel_hrut_tras.id_hrut = eventos.id_hrut)
4. 0.007 0.046 ↓ 0.0 0 1

Sort (cost=98.53..98.55 rows=7 width=191) (actual time=0.045..0.046 rows=0 loops=1)

  • Sort Key: traslado.id_tras
  • Sort Method: quicksort Memory: 25kB
5. 0.001 0.039 ↓ 0.0 0 1

Nested Loop (cost=69.46..98.43 rows=7 width=191) (actual time=0.038..0.039 rows=0 loops=1)

6. 0.001 0.038 ↓ 0.0 0 1

Nested Loop (cost=69.17..96.23 rows=7 width=148) (actual time=0.038..0.038 rows=0 loops=1)

7. 0.002 0.037 ↓ 0.0 0 1

Nested Loop (cost=68.88..94.07 rows=7 width=120) (actual time=0.037..0.037 rows=0 loops=1)

8. 0.014 0.014 ↑ 1.0 1 1

Index Scan using hoja_ruta_pkey on hoja_ruta (cost=0.42..8.44 rows=1 width=28) (actual time=0.013..0.014 rows=1 loops=1)

  • Index Cond: (id_hrut = 384265)
9. 0.000 0.021 ↓ 0.0 0 1

Nested Loop Left Join (cost=68.45..85.56 rows=7 width=96) (actual time=0.021..0.021 rows=0 loops=1)

  • Join Filter: (rel_hrut_tras.id_hrut = rel_hrut_veh.id_hrut)
10. 0.008 0.021 ↓ 0.0 0 1

Hash Right Join (cost=67.75..72.63 rows=7 width=79) (actual time=0.020..0.021 rows=0 loops=1)

  • Hash Cond: ((unidad.id_uni)::text = (traslado.appointment_uodoc)::text)
11. 0.000 0.000 ↓ 0.0 0

Seq Scan on unidad (cost=0.00..4.08 rows=208 width=29) (never executed)

12. 0.001 0.013 ↓ 0.0 0 1

Hash (cost=67.67..67.67 rows=7 width=63) (actual time=0.013..0.013 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
13. 0.001 0.012 ↓ 0.0 0 1

Nested Loop (cost=0.85..67.67 rows=7 width=63) (actual time=0.012..0.012 rows=0 loops=1)

14. 0.011 0.011 ↓ 0.0 0 1

Index Only Scan using rel_hrut_tras_pkey on rel_hrut_tras (cost=0.43..8.55 rows=7 width=8) (actual time=0.011..0.011 rows=0 loops=1)

  • Index Cond: (id_hrut = 384265)
  • Heap Fetches: 0
15. 0.000 0.000 ↓ 0.0 0

Index Scan using traslado_pkey on traslado (cost=0.43..8.45 rows=1 width=59) (never executed)

  • Index Cond: (id_tras = rel_hrut_tras.id_tras)
16. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.70..12.83 rows=1 width=21) (never executed)

17. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.70..12.82 rows=1 width=21) (never executed)

18. 0.000 0.000 ↓ 0.0 0

Index Only Scan using rel_hrut_veh_pkey on rel_hrut_veh (cost=0.42..4.44 rows=1 width=8) (never executed)

  • Index Cond: (id_hrut = 384265)
  • Heap Fetches: 0
19. 0.000 0.000 ↓ 0.0 0

Index Scan using vehiculo_pkey on vehiculo (cost=0.28..8.37 rows=1 width=21) (never executed)

  • Index Cond: (rel_hrut_veh.id_veh = id)
20. 0.000 0.000 ↓ 0.0 0

Index Scan using persona_pkey on persona (cost=0.29..0.31 rows=1 width=36) (never executed)

  • Index Cond: (id = traslado.id_per)
21. 0.000 0.000 ↓ 0.0 0

Index Scan using direccion_pkey on direccion (cost=0.29..0.31 rows=1 width=51) (never executed)

  • Index Cond: (id = traslado.id_dir)
22. 0.000 0.000 ↓ 0.0 0

Materialize (cost=66,132.85..66,132.95 rows=6 width=40) (never executed)

23. 0.000 0.000 ↓ 0.0 0

Unique (cost=66,132.85..66,132.88 rows=6 width=48) (never executed)

24. 0.000 0.000 ↓ 0.0 0

Sort (cost=66,132.85..66,132.86 rows=6 width=48) (never executed)

  • Sort Key: eventos.id_tras, eventos.id_eve
25. 0.000 0.000 ↓ 0.0 0

Gather (cost=1,000.00..66,132.77 rows=6 width=48) (never executed)

  • Workers Planned: 2
  • Workers Launched: 0
26. 0.000 0.000 ↓ 0.0 0

Parallel Seq Scan on eventos (cost=0.00..65,132.17 rows=2 width=48) (never executed)

  • Filter: (((result_eve)::text = 'ARRIVAL'::text) AND (id_hrut = 384265))
27. 0.000 0.000 ↓ 0.0 0

Materialize (cost=66,133.21..66,133.37 rows=9 width=40) (never executed)

28. 0.000 0.000 ↓ 0.0 0

Unique (cost=66,133.21..66,133.26 rows=9 width=48) (never executed)

29. 0.000 0.000 ↓ 0.0 0

Sort (cost=66,133.21..66,133.23 rows=9 width=48) (never executed)

  • Sort Key: eventos_1.id_tras, eventos_1.id_eve
30. 0.000 0.000 ↓ 0.0 0

Gather (cost=1,000.00..66,133.07 rows=9 width=48) (never executed)

  • Workers Planned: 2
  • Workers Launched: 0
31. 0.000 0.000 ↓ 0.0 0

Parallel Seq Scan on eventos eventos_1 (cost=0.00..65,132.17 rows=4 width=48) (never executed)

  • Filter: (((result_eve)::text = 'DEPARTURE'::text) AND (id_hrut = 384265))