explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YR1b

Settings
# exclusive inclusive rows x rows loops node
1. 0.010 479.535 ↑ 1.0 10 1

Limit (cost=2.36..280.84 rows=10 width=1,946) (actual time=477.791..479.535 rows=10 loops=1)

2. 0.054 479.525 ↑ 1,246.6 10 1

Nested Loop Left Join (cost=2.36..347,163.79 rows=12,466 width=1,946) (actual time=477.789..479.525 rows=10 loops=1)

3. 0.008 479.201 ↑ 1,246.6 10 1

Nested Loop (cost=2.08..208,330.02 rows=12,466 width=1,833) (actual time=477.675..479.201 rows=10 loops=1)

4. 0.007 479.173 ↑ 1,246.6 10 1

Nested Loop Left Join (cost=2.08..208,173.18 rows=12,466 width=1,317) (actual time=477.653..479.173 rows=10 loops=1)

5. 0.010 479.116 ↑ 1,246.6 10 1

Nested Loop (cost=1.66..199,139.74 rows=12,466 width=1,301) (actual time=477.620..479.116 rows=10 loops=1)

6. 0.007 479.096 ↑ 1,246.6 10 1

Nested Loop Left Join (cost=1.39..195,511.92 rows=12,466 width=1,273) (actual time=477.610..479.096 rows=10 loops=1)

7. 0.005 479.069 ↑ 1,246.6 10 1

Nested Loop (cost=1.12..191,884.10 rows=12,466 width=1,237) (actual time=477.597..479.069 rows=10 loops=1)

8. 0.006 479.034 ↑ 1,246.6 10 1

Nested Loop (cost=0.97..189,851.71 rows=12,466 width=1,202) (actual time=477.577..479.034 rows=10 loops=1)

9. 0.012 479.008 ↑ 1,246.6 10 1

Nested Loop (cost=0.83..187,888.41 rows=12,466 width=1,190) (actual time=477.561..479.008 rows=10 loops=1)

10. 0.009 478.976 ↑ 1,246.6 10 1

Nested Loop (cost=0.56..184,260.58 rows=12,466 width=1,166) (actual time=477.544..478.976 rows=10 loops=1)

11. 0.007 478.957 ↑ 1,246.6 10 1

Nested Loop (cost=0.42..182,331.50 rows=12,466 width=646) (actual time=477.533..478.957 rows=10 loops=1)

12. 72.778 478.920 ↑ 1,246.6 10 1

Index Scan using "planillaruteo_UQ_PlanillaRuteo_LegacyPK" on planillaruteo "Extent1" (cost=0.29..180,402.41 rows=12,466 width=126) (actual time=477.508..478.920 rows=10 loops=1)

  • Index Cond: (idempresa = 1)
  • Filter: (activo AND (estado = 1) AND ((NOT (alternatives: SubPlan 4 or hashed SubPlan 5)) OR (4 = (SubPlan 6))))
  • Rows Removed by Filter: 24751
13.          

SubPlan (for Index Scan)

14. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.84..74.71 rows=27 width=0) (never executed)

15. 0.000 0.000 ↓ 0.0 0

Index Scan using detalleplanillaruteo_idplanillaruteo_idx on detalleplanillaruteo "Extent15" (cost=0.42..3.16 rows=27 width=8) (never executed)

  • Index Cond: ("Extent1".id = idplanillaruteo)
16. 0.000 0.000 ↓ 0.0 0

Index Scan using "detalleviajemovil_IX_IDDetallePlanillaRuteo" on detalleviajemovil "Extent16" (cost=0.42..2.64 rows=1 width=8) (never executed)

  • Index Cond: (iddetalleplanillaruteo = "Extent15".id)
  • Filter: activo
17. 110.069 307.406 ↓ 1.0 419,221 1

Merge Join (cost=2.13..31,596.76 rows=418,734 width=8) (actual time=0.051..307.406 rows=419,221 loops=1)

  • Merge Cond: ("Extent15_1".id = "Extent16_1".iddetalleplanillaruteo)
18. 79.157 79.157 ↑ 1.0 420,444 1

Index Scan using "PK_dbo.detalleplanillaruteo" on detalleplanillaruteo "Extent15_1" (cost=0.42..12,572.43 rows=420,663 width=16) (actual time=0.024..79.157 rows=420,444 loops=1)

19. 118.180 118.180 ↓ 1.0 419,221 1

Index Scan using "detalleviajemovil_IX_IDDetallePlanillaRuteo" on detalleviajemovil "Extent16_1" (cost=0.42..12,773.67 rows=418,734 width=8) (actual time=0.019..118.180 rows=419,221 loops=1)

  • Filter: activo
  • Rows Removed by Filter: 8388
20. 0.000 98.736 ↑ 1.0 1 24,684

Limit (cost=0.84..3.58 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=24,684)

21. 0.000 98.736 ↑ 27.0 1 24,684

Nested Loop (cost=0.84..74.77 rows=27 width=4) (actual time=0.004..0.004 rows=1 loops=24,684)

22. 49.368 49.368 ↑ 27.0 1 24,684

Index Scan using detalleplanillaruteo_idplanillaruteo_idx on detalleplanillaruteo "Extent12_3" (cost=0.42..3.22 rows=27 width=8) (actual time=0.002..0.002 rows=1 loops=24,684)

  • Index Cond: (idplanillaruteo = "Extent1".id)
  • Filter: (idempresa = "Extent1".idempresa)
23. 49.368 49.368 ↑ 1.0 1 24,684

Index Scan using "detalleviajemovil_IX_IDDetallePlanillaRuteo" on detalleviajemovil "Extent11_3" (cost=0.42..2.64 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=24,684)

  • Index Cond: (iddetalleplanillaruteo = "Extent12_3".id)
  • Filter: activo
  • Rows Removed by Filter: 0
24. 0.030 0.030 ↑ 1.0 1 10

Index Scan using "PK_dbo.deposito" on deposito "Extent2" (cost=0.14..0.16 rows=1 width=528) (actual time=0.003..0.003 rows=1 loops=10)

  • Index Cond: (id = "Extent1".iddepositoorigen)
25. 0.010 0.010 ↑ 1.0 1 10

Index Scan using "PK_dbo.deposito" on deposito "Extent3" (cost=0.14..0.16 rows=1 width=528) (actual time=0.001..0.001 rows=1 loops=10)

  • Index Cond: (id = "Extent1".iddepositodestino)
26. 0.020 0.020 ↑ 1.0 1 10

Index Scan using "PK_dbo.empleado" on empleado "Extent4" (cost=0.27..0.29 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=10)

  • Index Cond: (id = "Extent1".idempleado)
27. 0.020 0.020 ↑ 1.0 1 10

Index Scan using "chofer_IX_ID" on chofer "Extent5" (cost=0.14..0.16 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=10)

  • Index Cond: (id = "Extent1".idchofer)
28. 0.030 0.030 ↑ 1.0 1 10

Index Scan using "PK_dbo.movil" on movil "Extent6" (cost=0.14..0.16 rows=1 width=43) (actual time=0.003..0.003 rows=1 loops=10)

  • Index Cond: (id = "Extent1".idmovil)
29. 0.020 0.020 ↑ 1.0 1 10

Index Scan using "PK_dbo.empleado" on empleado "Extent7" (cost=0.27..0.29 rows=1 width=36) (actual time=0.002..0.002 rows=1 loops=10)

  • Index Cond: ("Extent1".idempleadoayudante = id)
30. 0.010 0.010 ↑ 1.0 1 10

Index Scan using "PK_dbo.empleado" on empleado "Extent8" (cost=0.27..0.29 rows=1 width=36) (actual time=0.001..0.001 rows=1 loops=10)

  • Index Cond: (id = "Extent1".idempleadoencargado)
31. 0.010 0.050 ↑ 1.0 1 10

Nested Loop (cost=0.41..0.71 rows=1 width=32) (actual time=0.005..0.005 rows=1 loops=10)

32. 0.030 0.030 ↑ 1.0 1 10

Index Only Scan using "chofer_IX_ID" on chofer "Extent14" (cost=0.14..0.21 rows=1 width=8) (actual time=0.002..0.003 rows=1 loops=10)

  • Index Cond: (id = "Extent5".id)
  • Heap Fetches: 10
33. 0.010 0.010 ↑ 1.0 1 10

Index Scan using "PK_dbo.empleado" on empleado "Extent13" (cost=0.27..0.50 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=10)

  • Index Cond: (id = "Extent14".id)
34. 0.006 0.020 ↑ 1.0 1 10

Materialize (cost=0.00..1.02 rows=1 width=524) (actual time=0.002..0.002 rows=1 loops=10)

35. 0.014 0.014 ↑ 1.0 1 1

Seq Scan on empresa "Extent9" (cost=0.00..1.01 rows=1 width=524) (actual time=0.014..0.014 rows=1 loops=1)

  • Filter: (id = 1)
36. 0.030 0.030 ↑ 1.0 1 10

Index Scan using "PK_dbo.lotefacturacion" on lotefacturacion "Extent10" (cost=0.28..0.30 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=10)

  • Index Cond: ("Extent1".idlotefacturacion = id)
37.          

SubPlan (for Nested Loop Left Join)

38. 0.000 0.100 ↓ 0.0 0 10

Limit (cost=0.84..3.58 rows=1 width=4) (actual time=0.010..0.010 rows=0 loops=10)

39. 0.020 0.100 ↓ 0.0 0 10

Nested Loop (cost=0.84..74.77 rows=27 width=4) (actual time=0.010..0.010 rows=0 loops=10)

40. 0.040 0.040 ↑ 6.8 4 10

Index Scan using detalleplanillaruteo_idplanillaruteo_idx on detalleplanillaruteo "Extent12" (cost=0.42..3.22 rows=27 width=8) (actual time=0.003..0.004 rows=4 loops=10)

  • Index Cond: (idplanillaruteo = "Extent1".id)
  • Filter: (idempresa = "Extent1".idempresa)
41. 0.040 0.040 ↓ 0.0 0 40

Index Scan using "detalleviajemovil_IX_IDDetallePlanillaRuteo" on detalleviajemovil "Extent11" (cost=0.42..2.64 rows=1 width=12) (actual time=0.001..0.001 rows=0 loops=40)

  • Index Cond: (iddetalleplanillaruteo = "Extent12".id)
  • Filter: activo
42. 0.000 0.070 ↓ 0.0 0 10

Limit (cost=0.84..3.58 rows=1 width=4) (actual time=0.007..0.007 rows=0 loops=10)

43. 0.010 0.070 ↓ 0.0 0 10

Nested Loop (cost=0.84..74.77 rows=27 width=4) (actual time=0.007..0.007 rows=0 loops=10)

44. 0.020 0.020 ↑ 6.8 4 10

Index Scan using detalleplanillaruteo_idplanillaruteo_idx on detalleplanillaruteo "Extent12_1" (cost=0.42..3.22 rows=27 width=8) (actual time=0.002..0.002 rows=4 loops=10)

  • Index Cond: (idplanillaruteo = "Extent1".id)
  • Filter: (idempresa = "Extent1".idempresa)
45. 0.040 0.040 ↓ 0.0 0 40

Index Scan using "detalleviajemovil_IX_IDDetallePlanillaRuteo" on detalleviajemovil "Extent11_1" (cost=0.42..2.64 rows=1 width=12) (actual time=0.001..0.001 rows=0 loops=40)

  • Index Cond: (iddetalleplanillaruteo = "Extent12_1".id)
  • Filter: activo
46. 0.000 0.070 ↓ 0.0 0 10

Limit (cost=0.84..3.58 rows=1 width=4) (actual time=0.007..0.007 rows=0 loops=10)

47. 0.000 0.070 ↓ 0.0 0 10

Nested Loop (cost=0.84..74.77 rows=27 width=4) (actual time=0.007..0.007 rows=0 loops=10)

48. 0.030 0.030 ↑ 6.8 4 10

Index Scan using detalleplanillaruteo_idplanillaruteo_idx on detalleplanillaruteo "Extent12_2" (cost=0.42..3.22 rows=27 width=8) (actual time=0.002..0.003 rows=4 loops=10)

  • Index Cond: (idplanillaruteo = "Extent1".id)
  • Filter: (idempresa = "Extent1".idempresa)
49. 0.040 0.040 ↓ 0.0 0 40

Index Scan using "detalleviajemovil_IX_IDDetallePlanillaRuteo" on detalleviajemovil "Extent11_2" (cost=0.42..2.64 rows=1 width=12) (actual time=0.001..0.001 rows=0 loops=40)

  • Index Cond: (iddetalleplanillaruteo = "Extent12_2".id)
  • Filter: activo
Planning time : 25.554 ms
Execution time : 479.945 ms