explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Q8oh

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 1,118.767 ↑ 1.0 1 1

Aggregate (cost=29,849.79..29,849.80 rows=1 width=8) (actual time=1,118.767..1,118.767 rows=1 loops=1)

2. 0.015 1,118.762 ↑ 1.0 1 1

GroupAggregate (cost=29,849.75..29,849.77 rows=1 width=8) (actual time=1,118.762..1,118.762 rows=1 loops=1)

  • Group Key: s.suscripcion_id
  • Filter: (count(s.suscripcion_id) = 1)
3. 0.014 1,118.747 ↑ 1.0 1 1

Sort (cost=29,849.75..29,849.76 rows=1 width=8) (actual time=1,118.747..1,118.747 rows=1 loops=1)

  • Sort Key: s.suscripcion_id
  • Sort Method: quicksort Memory: 25kB
4. 1.310 1,118.733 ↑ 1.0 1 1

Nested Loop (cost=103.15..29,849.74 rows=1 width=8) (actual time=928.496..1,118.733 rows=1 loops=1)

  • Join Filter: ((s.numero_cuenta)::text = (s2.numero_cuenta)::text)
  • Rows Removed by Join Filter: 6180
5. 0.023 0.023 ↑ 1.0 1 1

Index Scan using clie_suscripciones_pk on clie_suscripciones s2 (cost=0.43..8.45 rows=1 width=8) (actual time=0.022..0.023 rows=1 loops=1)

  • Index Cond: (suscripcion_id = '4595577'::bigint)
6. 5.794 1,117.400 ↓ 686.8 6,181 1

Nested Loop (cost=102.72..29,841.18 rows=9 width=24) (actual time=1.244..1,117.400 rows=6,181 loops=1)

7. 6.406 1,105.425 ↓ 686.8 6,181 1

Nested Loop (cost=102.57..29,839.59 rows=9 width=32) (actual time=1.228..1,105.425 rows=6,181 loops=1)

8. 3.273 1,068.649 ↓ 1,012.3 15,185 1

Nested Loop (cost=102.29..29,834.90 rows=15 width=32) (actual time=1.214..1,068.649 rows=15,185 loops=1)

9. 0.476 1,024.024 ↓ 1,723.0 5,169 1

Nested Loop (cost=101.73..29,613.69 rows=3 width=24) (actual time=1.194..1,024.024 rows=5,169 loops=1)

10. 3.383 984.257 ↓ 1,871.0 5,613 1

Nested Loop (cost=101.30..29,612.06 rows=3 width=32) (actual time=1.173..984.257 rows=5,613 loops=1)

11. 3.896 947.196 ↓ 1,871.0 5,613 1

Nested Loop (cost=100.86..29,586.67 rows=3 width=32) (actual time=1.155..947.196 rows=5,613 loops=1)

  • Join Filter: (c.dia_facturacion = cf.dia_facturacion)
  • Rows Removed by Join Filter: 16839
12. 0.824 0.824 ↓ 4.0 4 1

Foreign Scan on fact_especificaciones_ciclo_facturacion cf (cost=100.00..112.27 rows=1 width=8) (actual time=0.821..0.824 rows=4 loops=1)

13. 29.032 942.476 ↓ 330.2 5,613 4

Nested Loop (cost=0.86..29,474.19 rows=17 width=40) (actual time=0.076..235.619 rows=5,613 loops=4)

14. 163.420 163.420 ↓ 125.3 17,046 4

Index Scan using clie_suscripciones_meve_organizaciones_venta_fk_i on clie_suscripciones s (cost=0.43..28,322.95 rows=136 width=24) (actual time=0.055..40.855 rows=17,046 loops=4)

  • Index Cond: ((codigo_organizacion_venta)::text = 'TRDAT'::text)
  • Filter: (((codigo_estado)::text = 'ACTIV'::text) AND ((codigo_tecnologia)::text = 'GPON'::text))
  • Rows Removed by Filter: 9760
15. 750.024 750.024 ↓ 0.0 0 68,184

Index Scan using clie_cuentas_pk on clie_cuentas c (cost=0.43..8.46 rows=1 width=16) (actual time=0.011..0.011 rows=0 loops=68,184)

  • Index Cond: ((numero_cuenta)::text = (s.numero_cuenta)::text)
  • Filter: (especificacion_id = 1126)
  • Rows Removed by Filter: 1
16. 33.678 33.678 ↑ 1.0 1 5,613

Index Scan using enco_roles_pk on enco_roles r (cost=0.43..8.45 rows=1 width=16) (actual time=0.006..0.006 rows=1 loops=5,613)

  • Index Cond: (rol_id = s.cliente_id)
  • Filter: ((tipo_rol)::text = 'CLIENTE'::text)
17. 39.291 39.291 ↑ 1.0 1 5,613

Index Scan using enco_personas_pk on enco_personas p (cost=0.43..0.54 rows=1 width=8) (actual time=0.006..0.007 rows=1 loops=5,613)

  • Index Cond: (persona_id = r.persona_id)
  • Filter: ((tipo_personeria)::text = 'PERFIS'::text)
  • Rows Removed by Filter: 0
18. 41.352 41.352 ↑ 6.0 3 5,169

Index Scan using prod_productos_contratados_clie_suscripciones_fk_i on prod_productos_contratados pc (cost=0.56..73.55 rows=18 width=16) (actual time=0.006..0.008 rows=3 loops=5,169)

  • Index Cond: (suscripcion_id = s.suscripcion_id)
  • Filter: ((codigo_estado)::text = 'ACTIVO'::text)
  • Rows Removed by Filter: 0
19. 30.370 30.370 ↓ 0.0 0 15,185

Index Scan using prod_productos_pk on prod_productos prod (cost=0.28..0.30 rows=1 width=16) (actual time=0.002..0.002 rows=0 loops=15,185)

  • Index Cond: (producto_id = pc.producto_id)
  • Filter: ((tipo_producto)::text = 'PLA'::text)
  • Rows Removed by Filter: 1
20. 6.181 6.181 ↑ 1.0 1 6,181

Index Only Scan using enco_especificaciones_pk on enco_especificaciones ep (cost=0.15..0.17 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=6,181)

  • Index Cond: (especificacion_id = prod.especificacion_id)
  • Heap Fetches: 7193
Planning time : 9.585 ms
Execution time : 1,119.383 ms