explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mUsp

Settings
# exclusive inclusive rows x rows loops node
1. 36.933 1,105.784 ↓ 560.0 560 1

Result (cost=12,115.93..12,127.82 rows=1 width=689) (actual time=1,067.302..1,105.784 rows=560 loops=1)

2. 0.895 1,067.141 ↓ 560.0 560 1

Sort (cost=12,115.93..12,115.93 rows=1 width=625) (actual time=1,066.992..1,067.141 rows=560 loops=1)

  • Sort Key: ntf.not_fecha_inicio DESC
  • Sort Method: quicksort Memory: 312kB
3. 16.974 1,066.246 ↓ 560.0 560 1

Nested Loop (cost=0.86..12,115.92 rows=1 width=625) (actual time=986.427..1,066.246 rows=560 loops=1)

  • Join Filter: (ca.prcs_id = pr.prcs_id)
  • Rows Removed by Join Filter: 94325
4. 46.922 1,040.312 ↓ 560.0 560 1

Nested Loop (cost=0.86..12,090.53 rows=1 width=449) (actual time=986.371..1,040.312 rows=560 loops=1)

  • Join Filter: (((pac.item_type)::text = (act.item_type)::text) AND ((pac.act_nombre)::text = (act.act_nombre)::text))
  • Rows Removed by Join Filter: 287840
5. 0.470 0.470 ↓ 73.6 515 1

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

  • Filter: (act_version = act_ult_version)
  • Rows Removed by Filter: 744
6. 16.455 992.920 ↓ 140.0 560 515

Materialize (cost=0.86..12,050.60 rows=4 width=431) (actual time=1.569..1.928 rows=560 loops=515)

7. 158.231 976.465 ↓ 140.0 560 1

Nested Loop (cost=0.86..12,050.58 rows=4 width=431) (actual time=807.808..976.465 rows=560 loops=1)

  • Join Filter: (ntf.actividad_id = pac.actividad_id)
  • Rows Removed by Join Filter: 712880
8. 0.326 0.326 ↑ 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..0.326 rows=1,274 loops=1)

9. 44.576 817.908 ↓ 140.0 560 1,274

Materialize (cost=0.86..11,944.41 rows=4 width=408) (actual time=0.000..0.642 rows=560 loops=1,274)

10. 39.315 773.332 ↓ 140.0 560 1

Nested Loop (cost=0.86..11,944.39 rows=4 width=408) (actual time=0.141..773.332 rows=560 loops=1)

11. 251.201 251.201 ↓ 206.7 30,176 1

Index Scan using wfa_caso_ind_3 on casos ca (cost=0.42..10,208.49 rows=146 width=361) (actual time=0.078..251.201 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
12. 218.316 482.816 ↓ 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.016..0.016 rows=0 loops=30,176)

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

SubPlan (forIndex Scan)

14. 26.450 264.500 ↓ 0.0 0 26,450

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

15. 238.050 238.050 ↓ 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.009..0.009 rows=0 loops=26,450)

  • Index Cond: ((usr_codigo = 'ARKADIOS'::text) AND (rol_nombre = (ntf.not_rol_receptor)::text))
  • Heap Fetches: 13
16. 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)
17. 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)

18. 8.960 8.960 ↑ 2.7 169 560

Seq Scan on procesos pr (cost=0.00..19.61 rows=461 width=56) (actual time=0.001..0.016 rows=169 loops=560)

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