explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4VVA : Optimization for: plan #vGml

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 417.315 7,610.601 ↓ 33.3 109,887 1

Hash Left Join (cost=5.66..8,647.95 rows=3,297 width=183) (actual time=0.292..7,610.601 rows=109,887 loops=1)

  • Hash Cond: (documento.idtipo = tipo.idtipo)
2. 334.407 7,193.212 ↓ 33.3 109,887 1

Hash Join (cost=3.76..8,592.48 rows=3,297 width=158) (actual time=0.208..7,193.212 rows=109,887 loops=1)

  • Hash Cond: (documento.idtipo = tipo_1.idtipo)
3. 659.308 6,858.732 ↓ 33.3 109,887 1

Nested Loop (cost=1.86..8,545.24 rows=3,297 width=158) (actual time=0.122..6,858.732 rows=109,887 loops=1)

4. 705.505 3,672.023 ↓ 33.3 109,887 1

Nested Loop (cost=1.57..7,424.35 rows=3,297 width=133) (actual time=0.106..3,672.023 rows=109,887 loops=1)

5. 462.597 878.665 ↓ 33.3 109,887 1

Hash Join (cost=1.14..4,849.49 rows=3,297 width=135) (actual time=0.065..878.665 rows=109,887 loops=1)

  • Hash Cond: ((documento.idestado)::text = (estado.idestado)::text)
6. 416.038 416.038 ↑ 1.0 109,887 1

Seq Scan on documento (cost=0.00..3,853.87 rows=109,887 width=139) (actual time=0.022..416.038 rows=109,887 loops=1)

7. 0.010 0.030 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=4) (actual time=0.030..0.030 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
8. 0.020 0.020 ↑ 1.0 6 1

Seq Scan on estado (cost=0.00..1.06 rows=6 width=4) (actual time=0.016..0.020 rows=6 loops=1)

9. 2,087.853 2,087.853 ↑ 1.0 1 109,887

Index Only Scan using personas_pkey on personas (cost=0.43..0.77 rows=1 width=7) (actual time=0.018..0.019 rows=1 loops=109,887)

  • Index Cond: (ci = (documento.ci)::text)
  • Heap Fetches: 0
10. 2,527.401 2,527.401 ↑ 1.0 1 109,887

Index Scan using empresa_pkey on empresa (cost=0.29..0.33 rows=1 width=30) (actual time=0.021..0.023 rows=1 loops=109,887)

  • Index Cond: ((nro_patronal)::text = (documento.nro_patronal)::text)
11. 0.036 0.073 ↑ 1.0 40 1

Hash (cost=1.40..1.40 rows=40 width=4) (actual time=0.073..0.073 rows=40 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
12. 0.037 0.037 ↑ 1.0 40 1

Seq Scan on tipo tipo_1 (cost=0.00..1.40 rows=40 width=4) (actual time=0.003..0.037 rows=40 loops=1)

13. 0.039 0.074 ↑ 1.0 40 1

Hash (cost=1.40..1.40 rows=40 width=33) (actual time=0.074..0.074 rows=40 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
14. 0.035 0.035 ↑ 1.0 40 1

Seq Scan on tipo (cost=0.00..1.40 rows=40 width=33) (actual time=0.003..0.035 rows=40 loops=1)