explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FQvP

Settings
# exclusive inclusive rows x rows loops node
1. 0.151 26.028 ↑ 1.0 100 1

Limit (cost=0.86..827,391.26 rows=100 width=635) (actual time=0.400..26.028 rows=100 loops=1)

2. 0.148 25.877 ↑ 530.7 100 1

Append (cost=0.86..439,062,988.01 rows=53,066 width=635) (actual time=0.398..25.877 rows=100 loops=1)

3. 3.279 25.729 ↑ 523.1 100 1

Nested Loop Left Join (cost=0.86..432,824,990.32 rows=52,313 width=469) (actual time=0.397..25.729 rows=100 loops=1)

  • Join Filter: (empresas_sucursales.id_tipo_inscripcion = empresas_tipo_inscripcion.id_tipo_inscripcion)
  • Rows Removed by Join Filter: 198
4. 0.295 6.850 ↑ 523.1 100 1

Nested Loop Left Join (cost=0.86..50,682.10 rows=52,313 width=449) (actual time=0.145..6.850 rows=100 loops=1)

  • Join Filter: (empresas_sucursales.type = empresas_sucursales_types.id)
5. 0.405 6.355 ↑ 523.1 100 1

Nested Loop Left Join (cost=0.86..49,896.36 rows=52,313 width=442) (actual time=0.133..6.355 rows=100 loops=1)

6. 0.348 5.250 ↑ 523.1 100 1

Nested Loop Left Join (cost=0.86..48,427.76 rows=52,313 width=388) (actual time=0.118..5.250 rows=100 loops=1)

7. 0.327 4.502 ↑ 523.1 100 1

Nested Loop Left Join (cost=0.72..39,790.11 rows=52,313 width=377) (actual time=0.107..4.502 rows=100 loops=1)

8. 0.576 3.575 ↑ 523.1 100 1

Nested Loop Left Join (cost=0.58..30,748.12 rows=52,313 width=341) (actual time=0.091..3.575 rows=100 loops=1)

  • Join Filter: (emp.id_categoria_empresa = empresas_categorias.id_categoria_empresa)
  • Rows Removed by Join Filter: 306
9. 0.443 2.599 ↑ 523.1 100 1

Nested Loop Left Join (cost=0.58..27,608.29 rows=52,313 width=327) (actual time=0.067..2.599 rows=100 loops=1)

10. 0.374 1.556 ↑ 523.1 100 1

Nested Loop (cost=0.58..26,159.66 rows=52,313 width=312) (actual time=0.047..1.556 rows=100 loops=1)

11. 0.482 0.482 ↑ 523.2 100 1

Index Scan Backward using empresas_sucursales_nro_patronal_key on empresas_sucursales (cost=0.29..5,658.17 rows=52,316 width=239) (actual time=0.018..0.482 rows=100 loops=1)

  • Filter: (type = 1)
  • Rows Removed by Filter: 12
12. 0.700 0.700 ↑ 1.0 1 100

Index Scan using empresas_pk on empresas emp (cost=0.29..0.38 rows=1 width=81) (actual time=0.006..0.007 rows=1 loops=100)

  • Index Cond: (id = empresas_sucursales.empresa_id)
  • Filter: (((document)::text <> '0'::text) AND ((document)::text <> ''::text) AND ((document)::text <> '-'::text))
13. 0.600 0.600 ↑ 1.0 1 100

Index Scan using empresas_types_id_idx on empresas_types (cost=0.00..0.02 rows=1 width=23) (actual time=0.005..0.006 rows=1 loops=100)

  • Index Cond: (emp.type = id)
14. 0.392 0.400 ↑ 1.0 4 100

Materialize (cost=0.00..1.06 rows=4 width=18) (actual time=0.001..0.004 rows=4 loops=100)

15. 0.008 0.008 ↑ 1.0 4 1

Seq Scan on empresas_categorias (cost=0.00..1.04 rows=4 width=18) (actual time=0.004..0.008 rows=4 loops=1)

16. 0.600 0.600 ↑ 1.0 1 100

Index Scan using city_id_distrito_id_idx on city (cost=0.14..0.16 rows=1 width=40) (actual time=0.005..0.006 rows=1 loops=100)

  • Index Cond: (empresas_sucursales.city_id = id)
17. 0.400 0.400 ↑ 1.0 1 100

Index Scan using distritos_pkey on distritos (cost=0.14..0.16 rows=1 width=19) (actual time=0.002..0.004 rows=1 loops=100)

  • Index Cond: (empresas_sucursales.distrito_id = id)
18. 0.700 0.700 ↑ 1.0 1 100

Index Scan using actividad_econ_id_activ_econ_idx on actividad_econ (cost=0.00..0.02 rows=1 width=58) (actual time=0.005..0.007 rows=1 loops=100)

  • Index Cond: (empresas_sucursales.id_activ_econ = id_activ_econ)
19. 0.195 0.200 ↑ 1.0 1 100

Materialize (cost=0.00..1.04 rows=1 width=23) (actual time=0.001..0.002 rows=1 loops=100)

20. 0.005 0.005 ↑ 1.0 1 1

Seq Scan on empresas_sucursales_types (cost=0.00..1.04 rows=1 width=23) (actual time=0.004..0.005 rows=1 loops=1)

  • Filter: (id = 1)
  • Rows Removed by Filter: 2
21. 0.293 0.300 ↑ 1.0 3 100

Materialize (cost=0.00..1.04 rows=3 width=24) (actual time=0.001..0.003 rows=3 loops=100)

22. 0.007 0.007 ↑ 1.0 3 1

Seq Scan on empresas_tipo_inscripcion (cost=0.00..1.03 rows=3 width=24) (actual time=0.004..0.007 rows=3 loops=1)

23.          

SubPlan (forNested Loop Left Join)

24. 0.600 3.600 ↑ 1.0 1 100

Aggregate (cost=1,957.96..1,957.97 rows=1 width=8) (actual time=0.032..0.036 rows=1 loops=100)

25. 0.500 3.000 ↓ 0.0 0 100

Nested Loop (cost=0.29..1,957.81 rows=60 width=8) (actual time=0.022..0.030 rows=0 loops=100)

26. 0.500 0.500 ↑ 1.0 1 100

Index Only Scan using empresas_sucursales_nro_patronal_key on empresas_sucursales es (cost=0.29..2.31 rows=1 width=4) (actual time=0.004..0.005 rows=1 loops=100)

  • Index Cond: (nro_patronal = empresas_sucursales.nro_patronal)
  • Heap Fetches: 5
27. 0.860 2.000 ↓ 0.0 0 100

Index Scan using empleados_npatronal_idx on empleados (cost=0.00..1,954.91 rows=60 width=24) (actual time=0.014..0.020 rows=0 loops=100)

  • Index Cond: (npatronal = empresas_sucursales.nro_patronal)
  • Filter: (SubPlan 2)
  • Rows Removed by Filter: 0
28.          

SubPlan (forIndex Scan)

29. 0.076 1.140 ↑ 1.0 1 38

Limit (cost=14.12..14.12 rows=1 width=20) (actual time=0.030..0.030 rows=1 loops=38)

30. 0.266 1.064 ↑ 1.0 1 38

Sort (cost=14.12..14.12 rows=1 width=20) (actual time=0.028..0.028 rows=1 loops=38)

  • Sort Key: empleados_movimientos.fecha, empleados_movimientos.id
  • Sort Method: quicksort Memory: 25kB
31. 0.152 0.798 ↑ 1.0 1 38

Result (cost=0.43..14.11 rows=1 width=20) (actual time=0.018..0.021 rows=1 loops=38)

  • One-Time Filter: (empleados.empresa_id = emp.id)
32. 0.446 0.646 ↑ 1.0 1 38

Index Scan using empleados_movimientos_empleado_id_tipo_idx on empleados_movimientos (cost=0.43..14.10 rows=1 width=20) (actual time=0.015..0.017 rows=1 loops=38)

  • Index Cond: (empleado_id = empleados.id)
  • Filter: (NOT (SubPlan 1))
33.          

SubPlan (forIndex Scan)

34. 0.200 0.200 ↓ 0.0 0 40

Index Scan using multas_id_registro_multado_idx on multas (cost=0.00..4.02 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=40)

  • Index Cond: (id_registro_multado = empleados_movimientos.id)
  • Filter: ((estado IS NULL) AND (idtipo_multa = 11))
35. 2.100 3.400 ↑ 1.0 1 100

Aggregate (cost=2,096.22..2,096.25 rows=1 width=16) (actual time=0.016..0.034 rows=1 loops=100)

36. 0.540 1.300 ↓ 0.0 0 100

Index Only Scan using empleados_empresa_id_id_idx on empleados emplea (cost=0.43..2,094.74 rows=74 width=16) (actual time=0.009..0.013 rows=0 loops=100)

  • Index Cond: (empresa_id = emp.id)
  • Filter: (SubPlan 5)
  • Rows Removed by Filter: 0
  • Heap Fetches: 3
37.          

SubPlan (forIndex Only Scan)

38. 0.076 0.760 ↑ 1.0 1 38

Limit (cost=14.11..14.12 rows=1 width=20) (actual time=0.020..0.020 rows=1 loops=38)

39. 0.266 0.684 ↑ 1.0 1 38

Sort (cost=14.11..14.12 rows=1 width=20) (actual time=0.018..0.018 rows=1 loops=38)

  • Sort Key: empleados_movimientos_1.fecha, empleados_movimientos_1.id
  • Sort Method: quicksort Memory: 25kB
40. 0.298 0.418 ↑ 1.0 1 38

Index Scan using empleados_movimientos_empleado_id_tipo_idx on empleados_movimientos empleados_movimientos_1 (cost=0.43..14.10 rows=1 width=20) (actual time=0.010..0.011 rows=1 loops=38)

  • Index Cond: (empleado_id = emplea.id)
  • Filter: (NOT (SubPlan 4))
41.          

SubPlan (forIndex Scan)

42. 0.120 0.120 ↓ 0.0 0 40

Index Scan using multas_id_registro_multado_idx on multas multas_1 (cost=0.00..4.02 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=40)

  • Index Cond: (id_registro_multado = empleados_movimientos_1.id)
  • Filter: ((estado IS NULL) AND (idtipo_multa = 11))
43. 0.300 3.300 ↑ 1.0 1 100

Aggregate (cost=2,105.50..2,105.51 rows=1 width=8) (actual time=0.032..0.033 rows=1 loops=100)

44. 0.400 3.000 ↓ 0.0 0 100

Nested Loop (cost=0.72..2,105.42 rows=31 width=8) (actual time=0.021..0.030 rows=0 loops=100)

45. 0.400 0.400 ↑ 1.0 1 100

Index Only Scan using empresas_sucursales_nro_patronal_key on empresas_sucursales es_1 (cost=0.29..2.31 rows=1 width=4) (actual time=0.003..0.004 rows=1 loops=100)

  • Index Cond: (nro_patronal = empresas_sucursales.nro_patronal)
  • Heap Fetches: 5
46. 0.332 2.200 ↓ 0.0 0 100

Nested Loop (cost=0.43..2,102.81 rows=31 width=16) (actual time=0.014..0.022 rows=0 loops=100)

47. 0.526 1.400 ↓ 0.0 0 100

Index Scan using empleados_npatronal_idx on empleados empleados_1 (cost=0.00..1,954.91 rows=60 width=24) (actual time=0.008..0.014 rows=0 loops=100)

  • Index Cond: (npatronal = empresas_sucursales.nro_patronal)
  • Filter: (SubPlan 8)
  • Rows Removed by Filter: 0
48.          

SubPlan (forIndex Scan)

49. 0.076 0.874 ↑ 1.0 1 38

Limit (cost=14.12..14.12 rows=1 width=20) (actual time=0.023..0.023 rows=1 loops=38)

50. 0.228 0.798 ↑ 1.0 1 38

Sort (cost=14.12..14.12 rows=1 width=20) (actual time=0.021..0.021 rows=1 loops=38)

  • Sort Key: empleados_movimientos_2.fecha, empleados_movimientos_2.id
  • Sort Method: quicksort Memory: 25kB
51. 0.190 0.570 ↑ 1.0 1 38

Result (cost=0.43..14.11 rows=1 width=20) (actual time=0.012..0.015 rows=1 loops=38)

  • One-Time Filter: (empleados_1.empresa_id = emp.id)
52. 0.260 0.380 ↑ 1.0 1 38

Index Scan using empleados_movimientos_empleado_id_tipo_idx on empleados_movimientos empleados_movimientos_2 (cost=0.43..14.10 rows=1 width=20) (actual time=0.009..0.010 rows=1 loops=38)

  • Index Cond: (empleado_id = empleados_1.id)
  • Filter: (NOT (SubPlan 7))
53.          

SubPlan (forIndex Scan)

54. 0.120 0.120 ↓ 0.0 0 40

Index Scan using multas_id_registro_multado_idx on multas multas_2 (cost=0.00..4.02 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=40)

  • Index Cond: (id_registro_multado = empleados_movimientos_2.id)
  • Filter: ((estado IS NULL) AND (idtipo_multa = 11))
55. 0.468 0.468 ↑ 1.0 1 36

Index Only Scan using persons_id_sexo_idx on persons (cost=0.43..2.46 rows=1 width=8) (actual time=0.012..0.013 rows=1 loops=36)

  • Index Cond: ((id = empleados_1.persona_id) AND (sexo = 'M'::text))
  • Heap Fetches: 0
56. 0.300 2.900 ↑ 1.0 1 100

Aggregate (cost=2,105.48..2,105.49 rows=1 width=8) (actual time=0.028..0.029 rows=1 loops=100)

57. 0.300 2.600 ↓ 0.0 0 100

Nested Loop (cost=0.72..2,105.40 rows=29 width=8) (actual time=0.025..0.026 rows=0 loops=100)

58. 0.400 0.400 ↑ 1.0 1 100

Index Only Scan using empresas_sucursales_nro_patronal_key on empresas_sucursales es_2 (cost=0.29..2.31 rows=1 width=4) (actual time=0.003..0.004 rows=1 loops=100)

  • Index Cond: (nro_patronal = empresas_sucursales.nro_patronal)
  • Heap Fetches: 5
59. 0.420 1.900 ↓ 0.0 0 100

Nested Loop (cost=0.43..2,102.81 rows=29 width=16) (actual time=0.018..0.019 rows=0 loops=100)

60. 0.426 1.300 ↓ 0.0 0 100

Index Scan using empleados_npatronal_idx on empleados empleados_2 (cost=0.00..1,954.91 rows=60 width=24) (actual time=0.008..0.013 rows=0 loops=100)

  • Index Cond: (npatronal = empresas_sucursales.nro_patronal)
  • Filter: (SubPlan 11)
  • Rows Removed by Filter: 0
61.          

SubPlan (forIndex Scan)

62. 0.076 0.874 ↑ 1.0 1 38

Limit (cost=14.12..14.12 rows=1 width=20) (actual time=0.023..0.023 rows=1 loops=38)

63. 0.228 0.798 ↑ 1.0 1 38

Sort (cost=14.12..14.12 rows=1 width=20) (actual time=0.021..0.021 rows=1 loops=38)

  • Sort Key: empleados_movimientos_3.fecha, empleados_movimientos_3.id
  • Sort Method: quicksort Memory: 25kB
64. 0.152 0.570 ↑ 1.0 1 38

Result (cost=0.43..14.11 rows=1 width=20) (actual time=0.013..0.015 rows=1 loops=38)

  • One-Time Filter: (empleados_2.empresa_id = emp.id)
65. 0.298 0.418 ↑ 1.0 1 38

Index Scan using empleados_movimientos_empleado_id_tipo_idx on empleados_movimientos empleados_movimientos_3 (cost=0.43..14.10 rows=1 width=20) (actual time=0.009..0.011 rows=1 loops=38)

  • Index Cond: (empleado_id = empleados_2.id)
  • Filter: (NOT (SubPlan 10))
66.          

SubPlan (forIndex Scan)

67. 0.120 0.120 ↓ 0.0 0 40

Index Scan using multas_id_registro_multado_idx on multas multas_3 (cost=0.00..4.02 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=40)

  • Index Cond: (id_registro_multado = empleados_movimientos_3.id)
  • Filter: ((estado IS NULL) AND (idtipo_multa = 11))
68. 0.180 0.180 ↓ 0.0 0 36

Index Only Scan using persons_id_sexo_idx on persons persons_1 (cost=0.43..2.46 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=36)

  • Index Cond: ((id = empleados_2.persona_id) AND (sexo = 'F'::text))
  • Heap Fetches: 0
69. 0.300 2.100 ↑ 1.0 1 100

Limit (cost=7.53..7.53 rows=1 width=27) (actual time=0.020..0.021 rows=1 loops=100)

70. 0.600 1.800 ↑ 2.0 1 100

Sort (cost=7.53..7.53 rows=2 width=27) (actual time=0.018..0.018 rows=1 loops=100)

  • Sort Key: cambio_situacion_empresa.fecha_creacion, cambio_situacion_empresa.id_cambio_situacion_empresa
  • Sort Method: quicksort Memory: 25kB
71. 0.476 1.200 ↑ 2.0 1 100

Hash Join (cost=1.57..7.52 rows=2 width=27) (actual time=0.009..0.012 rows=1 loops=100)

  • Hash Cond: (cambio_situacion_empresa.situacion_act = situacion_emp.id_situacion)
72. 0.700 0.700 ↑ 2.0 1 100

Index Scan using cambio_situacion_empresa_nro_patronal_fecha_creacion_id_cam_idx on cambio_situacion_empresa (cost=0.42..6.33 rows=2 width=20) (actual time=0.006..0.007 rows=1 loops=100)

  • Index Cond: (nro_patronal = empresas_sucursales.nro_patronal)
73. 0.013 0.024 ↑ 1.0 7 1

Hash (cost=1.07..1.07 rows=7 width=15) (actual time=0.024..0.024 rows=7 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
74. 0.011 0.011 ↑ 1.0 7 1

Seq Scan on situacion_emp (cost=0.00..1.07 rows=7 width=15) (actual time=0.004..0.011 rows=7 loops=1)

75. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.72..6,237,467.03 rows=753 width=471) (never executed)

  • Join Filter: (empresas_sucursales_1.id_tipo_inscripcion = empresas_tipo_inscripcion_1.id_tipo_inscripcion)
76. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.72..8,057.37 rows=753 width=451) (never executed)

  • Join Filter: (empresas_sucursales_1.type = empresas_sucursales_types_1.id)
77. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.72..8,022.45 rows=753 width=444) (never executed)

78. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.72..7,971.74 rows=753 width=390) (never executed)

  • Join Filter: (empresas_sucursales_1.distrito_id = distritos_1.id)
79. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.72..7,767.20 rows=753 width=379) (never executed)

80. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.58..7,619.31 rows=753 width=343) (never executed)

  • Join Filter: (emp_1.id_categoria_empresa = empresas_categorias_1.id_categoria_empresa)
81. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.58..7,573.08 rows=753 width=329) (never executed)

82. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.58..7,552.23 rows=753 width=314) (never executed)

83. 0.000 0.000 ↓ 0.0 0

Index Scan Backward using empresas_sucursales_nro_patronal_key on empresas_sucursales empresas_sucursales_1 (cost=0.29..5,805.62 rows=753 width=302) (never executed)

  • Filter: ((type <> 1) AND (type <> 1))
84. 0.000 0.000 ↓ 0.0 0

Index Scan using empresas_pk on empresas emp_1 (cost=0.29..2.31 rows=1 width=20) (never executed)

  • Index Cond: (id = empresas_sucursales_1.empresa_id)
  • Filter: (((document)::text <> '0'::text) AND ((document)::text <> ''::text) AND ((document)::text <> '-'::text))
85. 0.000 0.000 ↓ 0.0 0

Index Scan using empresas_types_id_idx on empresas_types empresas_types_1 (cost=0.00..0.02 rows=1 width=23) (never executed)

  • Index Cond: (emp_1.type = id)
86. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..1.06 rows=4 width=18) (never executed)

87. 0.000 0.000 ↓ 0.0 0

Seq Scan on empresas_categorias empresas_categorias_1 (cost=0.00..1.04 rows=4 width=18) (never executed)

88. 0.000 0.000 ↓ 0.0 0

Index Scan using city_id_distrito_id_idx on city city_1 (cost=0.14..0.19 rows=1 width=40) (never executed)

  • Index Cond: (empresas_sucursales_1.city_id = id)
89. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..1.27 rows=18 width=19) (never executed)

90. 0.000 0.000 ↓ 0.0 0

Seq Scan on distritos distritos_1 (cost=0.00..1.18 rows=18 width=19) (never executed)

91. 0.000 0.000 ↓ 0.0 0

Index Scan using actividad_econ_id_activ_econ_idx on actividad_econ actividad_econ_1 (cost=0.00..0.06 rows=1 width=58) (never executed)

  • Index Cond: (empresas_sucursales_1.id_activ_econ = id_activ_econ)
92. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..1.04 rows=3 width=23) (never executed)

93. 0.000 0.000 ↓ 0.0 0

Seq Scan on empresas_sucursales_types empresas_sucursales_types_1 (cost=0.00..1.03 rows=3 width=23) (never executed)

94. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..1.04 rows=3 width=24) (never executed)

95. 0.000 0.000 ↓ 0.0 0

Seq Scan on empresas_tipo_inscripcion empresas_tipo_inscripcion_1 (cost=0.00..1.03 rows=3 width=24) (never executed)

96.          

SubPlan (forNested Loop Left Join)

97. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=1,957.96..1,957.97 rows=1 width=8) (never executed)

98. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.29..1,957.81 rows=60 width=8) (never executed)

99. 0.000 0.000 ↓ 0.0 0

Index Only Scan using empresas_sucursales_nro_patronal_key on empresas_sucursales es_3 (cost=0.29..2.31 rows=1 width=4) (never executed)

  • Index Cond: (nro_patronal = empresas_sucursales_1.nro_patronal)
  • Heap Fetches: 0
100. 0.000 0.000 ↓ 0.0 0

Index Scan using empleados_npatronal_idx on empleados empleados_3 (cost=0.00..1,954.91 rows=60 width=24) (never executed)

  • Index Cond: (npatronal = empresas_sucursales_1.nro_patronal)
  • Filter: (SubPlan 15)
101.          

SubPlan (forIndex Scan)

102. 0.000 0.000 ↓ 0.0 0

Limit (cost=14.12..14.12 rows=1 width=20) (never executed)

103. 0.000 0.000 ↓ 0.0 0

Sort (cost=14.12..14.12 rows=1 width=20) (never executed)

  • Sort Key: empleados_movimientos_4.fecha, empleados_movimientos_4.id
104. 0.000 0.000 ↓ 0.0 0

Result (cost=0.43..14.11 rows=1 width=20) (never executed)

  • One-Time Filter: (empleados_3.empresa_id = emp_1.id)
105. 0.000 0.000 ↓ 0.0 0

Index Scan using empleados_movimientos_empleado_id_tipo_idx on empleados_movimientos empleados_movimientos_4 (cost=0.43..14.10 rows=1 width=20) (never executed)

  • Index Cond: (empleado_id = empleados_3.id)
  • Filter: (NOT (SubPlan 14))
106.          

SubPlan (forIndex Scan)

107. 0.000 0.000 ↓ 0.0 0

Index Scan using multas_id_registro_multado_idx on multas multas_4 (cost=0.00..4.02 rows=1 width=8) (never executed)

  • Index Cond: (id_registro_multado = empleados_movimientos_4.id)
  • Filter: ((estado IS NULL) AND (idtipo_multa = 11))
108. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=2,096.22..2,096.25 rows=1 width=16) (never executed)

109. 0.000 0.000 ↓ 0.0 0

Index Only Scan using empleados_empresa_id_id_idx on empleados emplea_1 (cost=0.43..2,094.74 rows=74 width=16) (never executed)

  • Index Cond: (empresa_id = emp_1.id)
  • Filter: (SubPlan 18)
  • Heap Fetches: 0
110.          

SubPlan (forIndex Only Scan)

111. 0.000 0.000 ↓ 0.0 0

Limit (cost=14.11..14.12 rows=1 width=20) (never executed)

112. 0.000 0.000 ↓ 0.0 0

Sort (cost=14.11..14.12 rows=1 width=20) (never executed)

  • Sort Key: empleados_movimientos_5.fecha, empleados_movimientos_5.id
113. 0.000 0.000 ↓ 0.0 0

Index Scan using empleados_movimientos_empleado_id_tipo_idx on empleados_movimientos empleados_movimientos_5 (cost=0.43..14.10 rows=1 width=20) (never executed)

  • Index Cond: (empleado_id = emplea_1.id)
  • Filter: (NOT (SubPlan 17))
114.          

SubPlan (forIndex Scan)

115. 0.000 0.000 ↓ 0.0 0

Index Scan using multas_id_registro_multado_idx on multas multas_5 (cost=0.00..4.02 rows=1 width=8) (never executed)

  • Index Cond: (id_registro_multado = empleados_movimientos_5.id)
  • Filter: ((estado IS NULL) AND (idtipo_multa = 11))
116. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=2,105.50..2,105.51 rows=1 width=8) (never executed)

117. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.72..2,105.42 rows=31 width=8) (never executed)

118. 0.000 0.000 ↓ 0.0 0

Index Only Scan using empresas_sucursales_nro_patronal_key on empresas_sucursales es_4 (cost=0.29..2.31 rows=1 width=4) (never executed)

  • Index Cond: (nro_patronal = empresas_sucursales_1.nro_patronal)
  • Heap Fetches: 0
119. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.43..2,102.81 rows=31 width=16) (never executed)

120. 0.000 0.000 ↓ 0.0 0

Index Scan using empleados_npatronal_idx on empleados empleados_4 (cost=0.00..1,954.91 rows=60 width=24) (never executed)

  • Index Cond: (npatronal = empresas_sucursales_1.nro_patronal)
  • Filter: (SubPlan 21)
121.          

SubPlan (forIndex Scan)

122. 0.000 0.000 ↓ 0.0 0

Limit (cost=14.12..14.12 rows=1 width=20) (never executed)

123. 0.000 0.000 ↓ 0.0 0

Sort (cost=14.12..14.12 rows=1 width=20) (never executed)

  • Sort Key: empleados_movimientos_6.fecha, empleados_movimientos_6.id
124. 0.000 0.000 ↓ 0.0 0

Result (cost=0.43..14.11 rows=1 width=20) (never executed)

  • One-Time Filter: (empleados_4.empresa_id = emp_1.id)
125. 0.000 0.000 ↓ 0.0 0

Index Scan using empleados_movimientos_empleado_id_tipo_idx on empleados_movimientos empleados_movimientos_6 (cost=0.43..14.10 rows=1 width=20) (never executed)

  • Index Cond: (empleado_id = empleados_4.id)
  • Filter: (NOT (SubPlan 20))
126.          

SubPlan (forIndex Scan)

127. 0.000 0.000 ↓ 0.0 0

Index Scan using multas_id_registro_multado_idx on multas multas_6 (cost=0.00..4.02 rows=1 width=8) (never executed)

  • Index Cond: (id_registro_multado = empleados_movimientos_6.id)
  • Filter: ((estado IS NULL) AND (idtipo_multa = 11))
128. 0.000 0.000 ↓ 0.0 0

Index Only Scan using persons_id_sexo_idx on persons persons_2 (cost=0.43..2.46 rows=1 width=8) (never executed)

  • Index Cond: ((id = empleados_4.persona_id) AND (sexo = 'M'::text))
  • Heap Fetches: 0
129. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=2,105.48..2,105.49 rows=1 width=8) (never executed)

130. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.72..2,105.40 rows=29 width=8) (never executed)

131. 0.000 0.000 ↓ 0.0 0

Index Only Scan using empresas_sucursales_nro_patronal_key on empresas_sucursales es_5 (cost=0.29..2.31 rows=1 width=4) (never executed)

  • Index Cond: (nro_patronal = empresas_sucursales_1.nro_patronal)
  • Heap Fetches: 0
132. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.43..2,102.81 rows=29 width=16) (never executed)

133. 0.000 0.000 ↓ 0.0 0

Index Scan using empleados_npatronal_idx on empleados empleados_5 (cost=0.00..1,954.91 rows=60 width=24) (never executed)

  • Index Cond: (npatronal = empresas_sucursales_1.nro_patronal)
  • Filter: (SubPlan 24)
134.          

SubPlan (forIndex Scan)

135. 0.000 0.000 ↓ 0.0 0

Limit (cost=14.12..14.12 rows=1 width=20) (never executed)

136. 0.000 0.000 ↓ 0.0 0

Sort (cost=14.12..14.12 rows=1 width=20) (never executed)

  • Sort Key: empleados_movimientos_7.fecha, empleados_movimientos_7.id
137. 0.000 0.000 ↓ 0.0 0

Result (cost=0.43..14.11 rows=1 width=20) (never executed)

  • One-Time Filter: (empleados_5.empresa_id = emp_1.id)
138. 0.000 0.000 ↓ 0.0 0

Index Scan using empleados_movimientos_empleado_id_tipo_idx on empleados_movimientos empleados_movimientos_7 (cost=0.43..14.10 rows=1 width=20) (never executed)

  • Index Cond: (empleado_id = empleados_5.id)
  • Filter: (NOT (SubPlan 23))
139.          

SubPlan (forIndex Scan)

140. 0.000 0.000 ↓ 0.0 0

Index Scan using multas_id_registro_multado_idx on multas multas_7 (cost=0.00..4.02 rows=1 width=8) (never executed)

  • Index Cond: (id_registro_multado = empleados_movimientos_7.id)
  • Filter: ((estado IS NULL) AND (idtipo_multa = 11))
141. 0.000 0.000 ↓ 0.0 0

Index Only Scan using persons_id_sexo_idx on persons persons_3 (cost=0.43..2.46 rows=1 width=8) (never executed)

  • Index Cond: ((id = empleados_5.persona_id) AND (sexo = 'F'::text))
  • Heap Fetches: 0
142. 0.000 0.000 ↓ 0.0 0

Limit (cost=7.53..7.53 rows=1 width=27) (never executed)

143. 0.000 0.000 ↓ 0.0 0

Sort (cost=7.53..7.53 rows=2 width=27) (never executed)

  • Sort Key: cambio_situacion_empresa_1.fecha_creacion, cambio_situacion_empresa_1.id_cambio_situacion_empresa
144. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=1.57..7.52 rows=2 width=27) (never executed)

  • Hash Cond: (cambio_situacion_empresa_1.situacion_act = situacion_emp_1.id_situacion)
145. 0.000 0.000 ↓ 0.0 0

Index Scan using cambio_situacion_empresa_nro_patronal_fecha_creacion_id_cam_idx on cambio_situacion_empresa cambio_situacion_empresa_1 (cost=0.42..6.33 rows=2 width=20) (never executed)

  • Index Cond: (nro_patronal = empresas_sucursales_1.nro_patronal)
146. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.07..1.07 rows=7 width=15) (never executed)

147. 0.000 0.000 ↓ 0.0 0

Seq Scan on situacion_emp situacion_emp_1 (cost=0.00..1.07 rows=7 width=15) (never executed)