explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 733.828 10,677.726 ↓ 33.3 109,887 1

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

2. 570.525 9,064.802 ↓ 33.3 109,887 1

Nested Loop (cost=1.86..8,644.45 rows=3,297 width=158) (actual time=0.250..9,064.802 rows=109,887 loops=1)

3. 642.378 7,065.746 ↓ 33.3 109,887 1

Nested Loop (cost=1.86..8,545.24 rows=3,297 width=158) (actual time=0.230..7,065.746 rows=109,887 loops=1)

4. 610.106 3,676.193 ↓ 33.3 109,887 1

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

5. 427.986 868.347 ↓ 33.3 109,887 1

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

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

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

7. 0.018 0.056 ↑ 1.0 6 1

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

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

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

9. 2,197.740 2,197.740 ↑ 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.019..0.020 rows=1 loops=109,887)

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

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

  • Index Cond: ((nro_patronal)::text = (documento.nro_patronal)::text)
11. 1,428.531 1,428.531 ↑ 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.011..0.013 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.007..0.008 rows=1 loops=109,887)

  • Index Cond: (documento.idtipo = idtipo)