explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fBJj

Settings
# exclusive inclusive rows x rows loops node
1. 33.492 932.030 ↓ 560.0 560 1

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

2. 0.753 896.828 ↓ 560.0 560 1

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

  • Sort Key: ntf.not_fecha_inicio DESC
  • Sort Method: quicksort Memory: 312kB
3. 16.620 896.075 ↓ 560.0 560 1

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

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

Nested Loop (cost=0.86..12,090.53 rows=1 width=449) (actual time=816.755..870.495 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.439 0.439 ↓ 73.6 515 1

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

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

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

7. 155.218 806.514 ↓ 140.0 560 1

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

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

9. 42.626 651.014 ↓ 140.0 560 1,274

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

10. 11.536 608.388 ↓ 140.0 560 1

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

11. 204.564 204.564 ↓ 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.065..204.564 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. 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 2)
  • Rows Removed by Filter: 1
13.          

SubPlan (forIndex Scan)

14. 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)

15. 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
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