explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Npk0

Settings
# exclusive inclusive rows x rows loops node
1. 1,182,859.203 1,304,165.770 ↓ 26,443.0 26,443 1

Nested Loop (cost=91.85..11,815.04 rows=1 width=6) (actual time=32,710.380..1,304,165.770 rows=26,443 loops=1)

  • Join Filter: ((ca.item_key)::text = substr((ntf.not_contexto)::text, ((instr(ntf.not_contexto, ':'::character varying, '1'::numeric, '1'::numeric) + 1))::numeric, ((instr(ntf.not_contexto, ':'::character varying, '1'::numeric, '2'::numeric) - (instr(ntf. (...)
  • Rows Removed by Join Filter: 890284913
2. 353.143 353.143 ↓ 1.0 30,178 1

Index Scan using wfa_caso_ind_3 on casos ca (cost=0.42..2,694.25 rows=29,151 width=12) (actual time=0.024..353.143 rows=30,178 loops=1)

  • Index Cond: (caso_fecha_termino IS NULL)
3. 55,746.478 120,953.424 ↓ 9,834.0 29,502 30,178

Materialize (cost=91.43..5,841.31 rows=3 width=19) (actual time=0.143..4.008 rows=29,502 loops=30,178)

4. 45,794.827 65,206.946 ↓ 9,834.0 29,502 1

Nested Loop (cost=91.43..5,841.29 rows=3 width=19) (actual time=4,307.025..65,206.946 rows=29,502 loops=1)

  • Join Filter: ((pac.actividad_id)::text = substr((ntf.not_contexto)::text, ((instr(ntf.not_contexto, ':'::character varying, '1'::numeric, '2'::numeric) + 1))::numeric, ((instr(ntf.not_contexto, ':'::character varying, '1'::numeric, '1'::numer (...)
  • Rows Removed by Join Filter: 34171429
5. 10.041 51.024 ↓ 1,159.0 1,159 1

Nested Loop (cost=91.00..131.29 rows=1 width=5) (actual time=1.189..51.024 rows=1,159 loops=1)

  • Join Filter: (((z.item_type)::text = (c.item_type)::text) AND (z.maximo = c.act_version) AND ((z.act_nombre)::text = (c.act_nombre)::text))
  • Rows Removed by Join Filter: 2800
6. 5.767 20.121 ↓ 115.9 1,159 1

Hash Join (cost=90.72..127.15 rows=10 width=82) (actual time=1.170..20.121 rows=1,159 loops=1)

  • Hash Cond: (((pac.item_type)::text = (z.item_type)::text) AND ((pac.act_nombre)::text = (z.act_nombre)::text))
7. 13.198 13.198 ↑ 1.0 1,274 1

Seq Scan on cwfa_actividades_proceso pac (cost=0.00..29.74 rows=1,274 width=28) (actual time=0.008..13.198 rows=1,274 loops=1)

8. 0.113 1.156 ↑ 1.1 388 1

Hash (cost=84.09..84.09 rows=442 width=54) (actual time=1.156..1.156 rows=388 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 31kB
9. 0.060 1.043 ↑ 1.1 388 1

Subquery Scan on z (cost=75.25..84.09 rows=442 width=54) (actual time=0.894..1.043 rows=388 loops=1)

10. 0.478 0.983 ↑ 1.1 388 1

HashAggregate (cost=75.25..79.67 rows=442 width=54) (actual time=0.893..0.983 rows=388 loops=1)

  • Group Key: a.item_type, a.act_nombre
11. 0.340 0.505 ↑ 1.6 839 1

Hash Join (cost=11.12..65.38 rows=1,316 width=27) (actual time=0.028..0.505 rows=839 loops=1)

  • Hash Cond: ((a.item_type)::text = (b.wrfw_descripcion)::text)
12. 0.148 0.148 ↑ 1.0 1,259 1

Seq Scan on cwfa_actividad a (cost=0.00..36.16 rows=1,316 width=27) (actual time=0.003..0.148 rows=1,259 loops=1)

13. 0.008 0.017 ↑ 1.4 36 1

Hash (cost=10.50..10.50 rows=50 width=516) (actual time=0.017..0.017 rows=36 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
14. 0.009 0.009 ↑ 1.4 36 1

Seq Scan on wf_item_types b (cost=0.00..10.50 rows=50 width=516) (actual time=0.003..0.009 rows=36 loops=1)

15. 20.862 20.862 ↓ 3.0 3 1,159

Index Only Scan using wfa_actividades_v2_pk on cwfa_actividad c (cost=0.28..0.40 rows=1 width=27) (actual time=0.017..0.018 rows=3 loops=1,159)

  • Index Cond: ((act_nombre = (pac.act_nombre)::text) AND (item_type = (pac.item_type)::text))
  • Heap Fetches: 3959
16. 19,361.095 19,361.095 ↓ 1.0 29,509 1,159

Index Scan using wfa_notificacion_n1 on cwfa_notificacion ntf (cost=0.43..4,711.39 rows=28,532 width=19) (actual time=0.028..16.705 rows=29,509 loops=1,159)

  • Index Cond: ((not_estado)::text = 'OPEN'::text)