explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 15KR

Settings
# exclusive inclusive rows x rows loops node
1. 33.900 718.637 ↓ 560.0 560 1

Result (cost=11,950.92..11,962.82 rows=1 width=2,803) (actual time=683.125..718.637 rows=560 loops=1)

2.          

CTE ca

3. 228.443 228.443 ↓ 206.7 30,176 1

Index Scan using wfa_caso_ind_3 on casos (cost=0.42..10,208.49 rows=146 width=361) (actual time=0.059..228.443 rows=30,176 loops=1)

  • Index Cond: (caso_fecha_termino IS NULL)
  • Filter: (prcs_id = (nvl(NULL::character varying, prcs_id))::numeric)
  • Rows Removed by Filter: 2
4. 0.976 683.027 ↓ 560.0 560 1

Sort (cost=1,742.44..1,742.44 rows=1 width=2,739) (actual time=682.892..683.027 rows=560 loops=1)

  • Sort Key: ntf.not_fecha_inicio DESC
  • Sort Method: quicksort Memory: 313kB
5. 1.662 682.051 ↓ 560.0 560 1

Nested Loop (cost=1.26..1,742.43 rows=1 width=2,739) (actual time=0.145..682.051 rows=560 loops=1)

6. 0.723 679.269 ↓ 560.0 560 1

Nested Loop (cost=0.99..1,741.67 rows=1 width=2,062) (actual time=0.129..679.269 rows=560 loops=1)

7. 0.584 675.746 ↓ 140.0 560 1

Nested Loop (cost=0.71..1,740.03 rows=4 width=2,044) (actual time=0.116..675.746 rows=560 loops=1)

8. 21.238 674.042 ↓ 140.0 560 1

Nested Loop (cost=0.43..1,738.83 rows=4 width=2,021) (actual time=0.108..674.042 rows=560 loops=1)

9. 260.516 260.516 ↓ 206.7 30,176 1

CTE Scan on ca (cost=0.00..2.92 rows=146 width=1,974) (actual time=0.063..260.516 rows=30,176 loops=1)

10. 180.688 392.288 ↓ 0.0 0 30,176

Index Scan using wfa_notificacion_n3 on cwfa_notificacion ntf (cost=0.43..11.88 rows=1 width=47) (actual time=0.013..0.013 rows=0 loops=30,176)

  • Index Cond: (((not_estado)::text = 'OPEN'::text) AND (caso_id = (ca.item_key)::numeric))
  • Filter: (SubPlan 3)
  • Rows Removed by Filter: 1
11.          

SubPlan (forIndex Scan)

12. 26.450 211.600 ↓ 0.0 0 26,450

Append (cost=0.42..8.47 rows=2 width=4) (actual time=0.008..0.008 rows=0 loops=26,450)

13. 185.150 185.150 ↓ 0.0 0 26,450

Index Only Scan using wfa_roles_usuarios_pk on cwfa_roles_usuario wur (cost=0.42..7.44 rows=1 width=4) (actual time=0.007..0.007 rows=0 loops=26,450)

  • Index Cond: ((usr_codigo = 'ARKADIOS'::text) AND (rol_nombre = (ntf.not_rol_receptor)::text))
  • Heap Fetches: 13
14. 0.000 0.000 ↓ 0.0 0 26,437

Result (cost=0.00..1.01 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=26,437)

  • One-Time Filter: ('ARKADIOS'::text = (ntf.not_rol_receptor)::text)
15. 0.000 0.000 ↑ 1.0 1 547

Seq Scan on dual (cost=0.00..1.01 rows=1 width=4) (actual time=0.000..0.000 rows=1 loops=547)

16. 1.120 1.120 ↑ 1.0 1 560

Index Scan using wfa_actividades_wf_pk on cwfa_actividades_proceso pac (cost=0.28..0.30 rows=1 width=28) (actual time=0.002..0.002 rows=1 loops=560)

  • Index Cond: (actividad_id = ntf.actividad_id)
17. 2.800 2.800 ↑ 1.0 1 560

Index Scan using wfa_actividades_v2_pk on cwfa_actividad act (cost=0.28..0.40 rows=1 width=47) (actual time=0.005..0.005 rows=1 loops=560)

  • Index Cond: (((act_nombre)::text = (pac.act_nombre)::text) AND ((item_type)::text = (pac.item_type)::text))
  • Filter: (act_version = act_ult_version)
  • Rows Removed by Filter: 1
18. 1.120 1.120 ↑ 1.0 1 560

Index Scan using prcs_pk on procesos pr (cost=0.27..0.75 rows=1 width=56) (actual time=0.002..0.002 rows=1 loops=560)

  • Index Cond: (prcs_id = ca.prcs_id)
19.          

SubPlan (forResult)

20. 1.710 1.710 ↓ 0.0 0 342

Index Scan using fed_index_n1 on fel_documento (cost=0.42..10.59 rows=1 width=32) (actual time=0.005..0.005 rows=0 loops=342)

  • Index Cond: (doc_numero_caso = to_number((ca.item_key)::text))
  • Filter: ((doc_numero_oficio IS NOT NULL) AND (doc_version = doc_ultima_version))
  • Rows Removed by Filter: 1