explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gQN : Optimization for: Optimization for: Optimization for: plan #vGml; plan #4VVA; plan #KDbU

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 682.004 13,800.294 ↓ 33.3 109,887 1

Nested Loop Left Join (cost=1.86..8,743.66 rows=3,297 width=183) (actual time=0.156..13,800.294 rows=109,887 loops=1)

2. 633.950 12,239.194 ↓ 33.3 109,887 1

Nested Loop (cost=1.86..8,644.45 rows=3,297 width=158) (actual time=0.132..12,239.194 rows=109,887 loops=1)

3. 708.428 10,396.487 ↓ 33.3 109,887 1

Nested Loop (cost=1.86..8,545.24 rows=3,297 width=158) (actual time=0.110..10,396.487 rows=109,887 loops=1)

4. 627.260 7,050.771 ↓ 33.3 109,887 1

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

5. 512.930 2,797.240 ↓ 33.3 109,887 1

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

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

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

7. 0.011 0.036 ↑ 1.0 6 1

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

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

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

9. 3,626.271 3,626.271 ↑ 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.032..0.033 rows=1 loops=109,887)

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

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

  • Index Cond: ((nro_patronal)::text = (documento.nro_patronal)::text)
11. 1,208.757 1,208.757 ↑ 1.0 1 109,887

Index Scan using tipo_idtipo_idx on tipo tipo_1 (cost=0.00..0.02 rows=1 width=4) (actual time=0.010..0.011 rows=1 loops=109,887)

  • Index Cond: (idtipo = documento.idtipo)
12. 879.096 879.096 ↑ 1.0 1 109,887

Index Scan using tipo_idtipo_idx on tipo (cost=0.00..0.02 rows=1 width=33) (actual time=0.006..0.008 rows=1 loops=109,887)

  • Index Cond: (documento.idtipo = idtipo)