explain.depesz.com

PostgreSQL's explain analyze made readable

Result: HgFn

Settings
# exclusive inclusive rows x rows loops node
1. 111.517 1,705.667 ↓ 110.0 110 1

Result (cost=153,870.38..153,883.71 rows=1 width=692) (actual time=1,594.434..1,705.667 rows=110 loops=1)

2. 0.218 1,594.059 ↓ 110.0 110 1

Sort (cost=153,870.38..153,870.38 rows=1 width=628) (actual time=1,594.030..1,594.059 rows=110 loops=1)

  • Sort Key: ntf.not_fecha_inicio DESC
  • Sort Method: quicksort Memory: 81kB
3. 4.155 1,593.841 ↓ 110.0 110 1

Nested Loop (cost=1.13..153,870.37 rows=1 width=628) (actual time=2.668..1,593.841 rows=110 loops=1)

  • Join Filter: (ca.prcs_id = pr.prcs_id)
  • Rows Removed by Join Filter: 23679
4. 1,052.391 1,587.706 ↓ 110.0 110 1

Nested Loop (cost=1.13..153,844.98 rows=1 width=451) (actual time=2.606..1,587.706 rows=110 loops=1)

  • Join Filter: (ntf.caso_id = (ca.item_key)::numeric)
  • Rows Removed by Join Filter: 3237630
5. 123.239 123.239 ↓ 197.5 29,434 1

Index Scan using wfa_caso_ind_3 on casos ca (cost=0.42..10,642.29 rows=149 width=363) (actual time=0.069..123.239 rows=29,434 loops=1)

  • Index Cond: (caso_fecha_termino IS NULL)
  • Filter: (prcs_id = (nvl(NULL::character varying, prcs_id))::numeric)
  • Rows Removed by Filter: 2
6. 159.816 412.076 ↓ 2.7 110 29,434

Materialize (cost=0.71..143,080.62 rows=41 width=88) (actual time=0.000..0.014 rows=110 loops=29,434)

7. 19.049 252.260 ↓ 2.7 110 1

Nested Loop (cost=0.71..143,080.41 rows=41 width=88) (actual time=2.529..252.260 rows=110 loops=1)

  • Join Filter: (pac.actividad_id = ntf.actividad_id)
  • Rows Removed by Join Filter: 127380
8. 20.827 223.421 ↑ 126.0 110 1

Index Scan using wfa_notificacion_n1 on cwfa_notificacion ntf (cost=0.43..142,158.90 rows=13,865 width=47) (actual time=0.061..223.421 rows=110 loops=1)

  • Index Cond: ((not_estado)::text = 'OPEN'::text)
  • Filter: (SubPlan 2)
  • Rows Removed by Filter: 28832
9.          

SubPlan (forIndex Scan)

10. 28.942 202.594 ↓ 0.0 0 28,942

Append (cost=0.42..9.47 rows=2 width=4) (actual time=0.007..0.007 rows=0 loops=28,942)

11. 173.652 173.652 ↓ 0.0 0 28,942

Index Only Scan using wfa_roles_usuarios_pk on cwfa_roles_usuario wur (cost=0.42..8.44 rows=1 width=4) (actual time=0.006..0.006 rows=0 loops=28,942)

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

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

  • One-Time Filter: ('ARKADIOS'::text = (ntf.not_rol_receptor)::text)
13. 0.096 0.096 ↑ 1.0 1 96

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

14. 6.276 9.790 ↓ 289.8 1,159 110

Materialize (cost=0.28..89.62 rows=4 width=46) (actual time=0.001..0.089 rows=1,159 loops=110)

15. 0.577 3.514 ↓ 289.8 1,159 1

Nested Loop (cost=0.28..89.60 rows=4 width=46) (actual time=0.049..3.514 rows=1,159 loops=1)

16. 0.362 0.362 ↓ 73.6 515 1

Seq Scan on cwfa_actividad act (cost=0.00..39.45 rows=7 width=47) (actual time=0.008..0.362 rows=515 loops=1)

  • Filter: (act_version = act_ult_version)
  • Rows Removed by Filter: 744
17. 2.575 2.575 ↓ 2.0 2 515

Index Scan using wfa_actividades_proceso_n1 on cwfa_actividades_proceso pac (cost=0.28..7.15 rows=1 width=28) (actual time=0.005..0.005 rows=2 loops=515)

  • Index Cond: (((item_type)::text = (act.item_type)::text) AND ((act_nombre)::text = (act.act_nombre)::text))
18. 1.980 1.980 ↑ 2.1 216 110

Seq Scan on procesos pr (cost=0.00..19.61 rows=461 width=56) (actual time=0.001..0.018 rows=216 loops=110)

19.          

SubPlan (forResult)

20. 0.091 0.091 ↓ 0.0 0 13

Index Scan using fed_index_n1 on fel_documento (cost=0.42..12.03 rows=1 width=32) (actual time=0.007..0.007 rows=0 loops=13)

  • 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