explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yqgC

Settings
# exclusive inclusive rows x rows loops node
1. 6,503.340 37,568.004 ↓ 1.6 11 1

Nested Loop (cost=8,032.05..11,333.77 rows=7 width=6) (actual time=884.299..37,568.004 rows=11 loops=1)

  • Join Filter: (((ntf.not_rol_receptor)::text = (wur.rol_nombre)::text) OR ((ntf.not_rol_receptor)::text = 'SOLEA'::text))
  • Rows Removed by Join Filter: 38263010
2.          

CTE ntf0

3. 93.946 93.946 ↓ 1.0 29,509 1

Index Scan using wfa_notificacion_n1 on cwfa_notificacion (cost=0.43..5,852.67 rows=28,532 width=73) (actual time=0.047..93.946 rows=29,509 loops=1)

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

CTE ntf

5. 43.875 155.241 ↓ 1.0 29,508 1

HashAggregate (cost=1,714.42..2,001.17 rows=28,675 width=282) (actual time=126.959..155.241 rows=29,508 loops=1)

  • Group Key: ntf0.subs1, ntf0.subs2, ntf0.not_rol_receptor
6. 2.770 111.366 ↓ 1.0 29,511 1

Append (cost=0.00..1,499.36 rows=28,675 width=282) (actual time=0.049..111.366 rows=29,511 loops=1)

7. 105.703 105.703 ↓ 1.0 29,509 1

CTE Scan on ntf0 (cost=0.00..570.64 rows=28,532 width=282) (actual time=0.049..105.703 rows=29,509 loops=1)

8. 2.893 2.893 ↑ 71.5 2 1

CTE Scan on ntf0 ntf0_1 (cost=0.00..641.97 rows=143 width=282) (actual time=2.271..2.893 rows=2 loops=1)

  • Filter: ('SOLEA'::text = (not_rol_receptor)::text)
  • Rows Removed by Filter: 29507
9. 40.182 681.657 ↓ 26,443.0 26,443 1

Nested Loop (cost=131.73..895.33 rows=1 width=224) (actual time=137.661..681.657 rows=26,443 loops=1)

10. 52.055 257.949 ↓ 9,834.0 29,502 1

Hash Join (cost=131.30..885.45 rows=3 width=250) (actual time=137.634..257.949 rows=29,502 loops=1)

  • Hash Cond: (ntf.subs1 = (pac.actividad_id)::text)
11. 195.235 195.235 ↓ 1.0 29,508 1

CTE Scan on ntf (cost=0.00..573.50 rows=28,675 width=282) (actual time=126.961..195.235 rows=29,508 loops=1)

12. 0.451 10.659 ↓ 1,159.0 1,159 1

Hash (cost=131.29..131.29 rows=1 width=5) (actual time=10.659..10.659 rows=1,159 loops=1)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 58kB
13. 1.202 10.208 ↓ 1,159.0 1,159 1

Nested Loop (cost=91.00..131.29 rows=1 width=5) (actual time=1.174..10.208 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
14. 0.746 2.052 ↓ 115.9 1,159 1

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

  • Hash Cond: (((pac.item_type)::text = (z.item_type)::text) AND ((pac.act_nombre)::text = (z.act_nombre)::text))
15. 0.178 0.178 ↑ 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.010..0.178 rows=1,274 loops=1)

16. 0.108 1.128 ↑ 1.1 388 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 31kB
17. 0.053 1.020 ↑ 1.1 388 1

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

18. 0.455 0.967 ↑ 1.1 388 1

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

  • Group Key: a.item_type, a.act_nombre
19. 0.336 0.512 ↑ 1.6 839 1

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

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

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

21. 0.008 0.024 ↑ 1.4 36 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
22. 0.016 0.016 ↑ 1.4 36 1

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

23. 6.954 6.954 ↓ 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.005..0.006 rows=3 loops=1,159)

  • Index Cond: ((act_nombre = (pac.act_nombre)::text) AND (item_type = (pac.item_type)::text))
  • Heap Fetches: 3959
24. 383.526 383.526 ↑ 1.0 1 29,502

Index Scan using wfa_caso_ind_2 on casos ca (cost=0.42..3.29 rows=1 width=12) (actual time=0.013..0.013 rows=1 loops=29,502)

  • Index Cond: ((item_key)::text = ntf.subs2)
  • Filter: (caso_fecha_termino IS NULL)
  • Rows Removed by Filter: 0
25. 24,354.003 30,383.007 ↓ 1.0 1,447 26,443

Bitmap Heap Scan on cwfa_roles_usuario wur (cost=46.49..2,563.19 rows=1,428 width=10) (actual time=0.357..1.149 rows=1,447 loops=26,443)

  • Recheck Cond: ((usr_codigo)::text = 'SOLEA'::text)
  • Heap Blocks: exact=26813202
26. 6,029.004 6,029.004 ↓ 1.0 1,449 26,443

Bitmap Index Scan on wfa_roles_usuarios_pk (cost=0.00..46.13 rows=1,428 width=0) (actual time=0.228..0.228 rows=1,449 loops=26,443)

  • Index Cond: ((usr_codigo)::text = 'SOLEA'::text)