explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9MAP

Settings
# exclusive inclusive rows x rows loops node
1. 19.648 1,311.103 ↓ 1.9 245,070 1

Result (cost=106,355.56..113,102.27 rows=130,659 width=14) (actual time=1,152.023..1,311.103 rows=245,070 loops=1)

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

Initplan (forResult)

3. 0.000 318.836 ↑ 1.0 1 1

Finalize Aggregate (cost=50,289.97..50,289.98 rows=1 width=8) (actual time=318.835..318.836 rows=1 loops=1)

4. 9.306 318.940 ↓ 1.5 3 1

Gather (cost=50,289.76..50,289.97 rows=2 width=8) (actual time=318.662..318.940 rows=3 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 0.007 309.634 ↑ 1.0 1 3

Partial Aggregate (cost=49,289.76..49,289.77 rows=1 width=8) (actual time=309.634..309.634 rows=1 loops=3)

6. 0.134 309.627 ↑ 1,725.7 9 3

Nested Loop (cost=72.46..49,250.93 rows=15,531 width=0) (actual time=203.641..309.627 rows=9 loops=3)

7. 74.522 309.477 ↑ 1,725.7 9 3

Hash Semi Join (cost=72.03..41,574.38 rows=15,531 width=14) (actual time=203.628..309.477 rows=9 loops=3)

  • Hash Cond: ((t.usuario)::text = (doc_roles_usuarios.rol_privacidad)::text)
8. 234.875 234.875 ↑ 1.3 727,747 3

Parallel Seq Scan on doc_documentos_privacidad t (cost=0.00..38,937.16 rows=911,398 width=26) (actual time=0.023..234.875 rows=727,747 loops=3)

  • Filter: (((vigencia)::text = 'S'::text) AND ((sel)::text = 'S'::text))
  • Rows Removed by Filter: 35515
9. 0.007 0.080 ↑ 11.0 2 3

Hash (cost=71.75..71.75 rows=22 width=21) (actual time=0.080..0.080 rows=2 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 0.001 0.073 ↑ 11.0 2 3

Append (cost=4.50..71.75 rows=22 width=21) (actual time=0.071..0.073 rows=2 loops=3)

11. 0.002 0.049 ↓ 0.0 0 3

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

  • Recheck Cond: (((usuario)::text = 'aciero'::text) AND ((vigencia)::text = 'S'::text))
12. 0.047 0.047 ↓ 0.0 0 3

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

  • Index Cond: (((usuario)::text = 'aciero'::text) AND ((vigencia)::text = 'S'::text))
13. 0.021 0.021 ↑ 1.0 1 3

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

14. 0.002 0.002 ↑ 1.0 1 3

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

15. 0.016 0.016 ↑ 1.0 1 26

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

  • Index Cond: (numero_docto = (t.numero_docto)::text)
  • Heap Fetches: 26
16. 118.964 972.619 ↓ 1.9 245,070 1

Hash Join (cost=106,355.56..113,102.27 rows=130,659 width=14) (actual time=833.183..972.619 rows=245,070 loops=1)

  • Hash Cond: ((a.numero_docto)::text = (e.numero_docto)::text)
17. 25.168 25.168 ↑ 1.0 286,868 1

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

18. 253.794 828.487 ↑ 1.0 968,278 1

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

  • Buckets: 1048576 Batches: 1 Memory Usage: 51689kB
19. 574.693 574.693 ↑ 1.0 968,278 1

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

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