explain.depesz.com

PostgreSQL's explain analyze made readable

Result: r9fD

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Append (cost=0.00..832,927.44 rows=2,325,538 width=14) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Seq Scan on doc_documentos_acceso dc (cost=0.00..575,442.00 rows=2,121,079 width=14) (actual rows= loops=)

  • Filter: ((privacidad <= '1'::numeric) OR (wfa.wfa_doc2_util_pkg.fun_getprivacidadexp(numero_docto, 'aciero'::character varying) IS NOT NULL))
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=72.46..4,073.99 rows=36,525 width=14) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Hash Semi Join (cost=72.03..845.43 rows=332 width=18) (actual rows= loops=)

  • Hash Cond: ((tt.rol_privacidad)::text = (doc_roles_usuarios.rol_privacidad)::text)
5. 0.000 0.000 ↓ 0.0

Seq Scan on doc_roles_documento tt (cost=0.00..724.60 rows=17,186 width=31) (actual rows= loops=)

  • Filter: (((vigencia)::text = 'S'::text) AND ((accion_select)::text = 'S'::text))
6. 0.000 0.000 ↓ 0.0

Hash (cost=71.75..71.75 rows=22 width=21) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Append (cost=4.50..71.75 rows=22 width=21) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on doc_roles_usuarios (cost=4.50..69.53 rows=20 width=20) (actual rows= loops=)

  • Recheck Cond: (((usuario)::text = 'aciero'::text) AND ((vigencia)::text = 'S'::text))
9. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on index3 (cost=0.00..4.49 rows=20 width=0) (actual rows= loops=)

  • Index Cond: (((usuario)::text = 'aciero'::text) AND ((vigencia)::text = 'S'::text))
10. 0.000 0.000 ↓ 0.0

Seq Scan on dual (cost=0.00..1.01 rows=1 width=32) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Seq Scan on dual dual_1 (cost=0.00..1.01 rows=1 width=32) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Index Scan using doc_docto_ind1 on doc_documentos_acceso dc_1 (cost=0.43..8.64 rows=108 width=29) (actual rows= loops=)

  • Index Cond: (((tipo_documento)::text = (tt.tipo_documento)::text) AND ((tipo_entidad_web)::text = (tt.pu_tipo_ent_web)::text))
13. 0.000 0.000 ↓ 0.0

Nested Loop (cost=72.46..83,625.30 rows=37,275 width=14) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Hash Semi Join (cost=72.03..65,201.29 rows=37,275 width=14) (actual rows= loops=)

  • Hash Cond: ((b.usuario)::text = (doc_roles_usuarios_1.rol_privacidad)::text)
15. 0.000 0.000 ↓ 0.0

Seq Scan on doc_documentos_privacidad b (cost=0.00..58,972.78 rows=2,187,355 width=26) (actual rows= loops=)

  • Filter: (((vigencia)::text = 'S'::text) AND ((sel)::text = 'S'::text))
16. 0.000 0.000 ↓ 0.0

Hash (cost=71.75..71.75 rows=22 width=21) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Append (cost=4.50..71.75 rows=22 width=21) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on doc_roles_usuarios doc_roles_usuarios_1 (cost=4.50..69.53 rows=20 width=20) (actual rows= loops=)

  • Recheck Cond: (((usuario)::text = 'aciero'::text) AND ((vigencia)::text = 'S'::text))
19. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on index3 (cost=0.00..4.49 rows=20 width=0) (actual rows= loops=)

  • Index Cond: (((usuario)::text = 'aciero'::text) AND ((vigencia)::text = 'S'::text))
20. 0.000 0.000 ↓ 0.0

Seq Scan on dual dual_2 (cost=0.00..1.01 rows=1 width=32) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Seq Scan on dual dual_3 (cost=0.00..1.01 rows=1 width=32) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Index Only Scan using doc_documentos_acceso_pk on doc_documentos_acceso dc_2 (cost=0.43..0.49 rows=1 width=14) (actual rows= loops=)

  • Index Cond: (numero_docto = (b.numero_docto)::text)
23. 0.000 0.000 ↓ 0.0

Result (cost=139,784.07..146,530.78 rows=130,659 width=14) (actual rows= loops=)

  • One-Time Filter: (0 < $1)
24.          

Initplan (forResult)

25. 0.000 0.000 ↓ 0.0

Aggregate (cost=83,718.49..83,718.50 rows=1 width=8) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Nested Loop (cost=72.46..83,625.30 rows=37,275 width=0) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Hash Semi Join (cost=72.03..65,201.29 rows=37,275 width=14) (actual rows= loops=)

  • Hash Cond: ((t.usuario)::text = (doc_roles_usuarios_2.rol_privacidad)::text)
28. 0.000 0.000 ↓ 0.0

Seq Scan on doc_documentos_privacidad t (cost=0.00..58,972.78 rows=2,187,355 width=26) (actual rows= loops=)

  • Filter: (((vigencia)::text = 'S'::text) AND ((sel)::text = 'S'::text))
29. 0.000 0.000 ↓ 0.0

Hash (cost=71.75..71.75 rows=22 width=21) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Append (cost=4.50..71.75 rows=22 width=21) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on doc_roles_usuarios doc_roles_usuarios_2 (cost=4.50..69.53 rows=20 width=20) (actual rows= loops=)

  • Recheck Cond: (((usuario)::text = 'aciero'::text) AND ((vigencia)::text = 'S'::text))
32. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on index3 (cost=0.00..4.49 rows=20 width=0) (actual rows= loops=)

  • Index Cond: (((usuario)::text = 'aciero'::text) AND ((vigencia)::text = 'S'::text))
33. 0.000 0.000 ↓ 0.0

Seq Scan on dual dual_4 (cost=0.00..1.01 rows=1 width=32) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Seq Scan on dual dual_5 (cost=0.00..1.01 rows=1 width=32) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Index Only Scan using doc_documentos_acceso_pk on doc_documentos_acceso e_1 (cost=0.43..0.49 rows=1 width=14) (actual rows= loops=)

  • Index Cond: (numero_docto = (t.numero_docto)::text)
36. 0.000 0.000 ↓ 0.0

Hash Join (cost=139,784.07..146,530.78 rows=130,659 width=14) (actual rows= loops=)

  • Hash Cond: ((a.numero_docto)::text = (e.numero_docto)::text)
37. 0.000 0.000 ↓ 0.0

Seq Scan on doc_adjuntos a (cost=0.00..5,993.68 rows=286,868 width=28) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Hash (cost=43,962.00..43,962.00 rows=968,286 width=14) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Seq Scan on doc_documentos_acceso e (cost=0.00..43,962.00 rows=968,286 width=14) (actual rows= loops=)

  • Filter: (privacidad = ANY ('{2,3}'::numeric[]))