explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 14Ib

Settings
# exclusive inclusive rows x rows loops node
1. 1,236.875 4,135.071 ↓ 1.0 678,869 1

Hash Join (cost=8,996.65..215,135.84 rows=649,764 width=92) (actual time=341.899..4,135.071 rows=678,869 loops=1)

  • Hash Cond: (empleado.nropatronal = cabsueldos.nropatronal)
2. 2,556.367 2,556.367 ↑ 1.0 679,824 1

Seq Scan on empleado (cost=0.00..136,362.68 rows=693,467 width=42) (actual time=0.033..2,556.367 rows=679,824 loops=1)

  • Filter: (((documento)::text <> '0'::text) AND (anho = 2018))
  • Rows Removed by Filter: 2672866
3. 43.417 341.829 ↓ 1.0 41,467 1

Hash (cost=8,493.77..8,493.77 rows=40,231 width=58) (actual time=341.829..341.829 rows=41,467 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 3686kB
4. 98.609 298.412 ↓ 1.0 41,467 1

Hash Left Join (cost=4,323.37..8,493.77 rows=40,231 width=58) (actual time=155.880..298.412 rows=41,467 loops=1)

  • Hash Cond: (cabsueldos.nropatronal = empresas_sucursales.nro_patronal)
5. 44.172 49.800 ↓ 1.0 41,467 1

Bitmap Heap Scan on cabsueldos (cost=845.30..4,160.79 rows=40,231 width=8) (actual time=5.842..49.800 rows=41,467 loops=1)

  • Recheck Cond: (anho = 2018)
  • Filter: (confirmado = 1)
  • Rows Removed by Filter: 644
6. 5.628 5.628 ↑ 1.0 42,111 1

Bitmap Index Scan on cabsueldos_anho_idx (cost=0.00..835.24 rows=42,299 width=0) (actual time=5.628..5.628 rows=42,111 loops=1)

  • Index Cond: (anho = 2018)
7. 67.750 150.003 ↓ 1.0 58,985 1

Hash (cost=2,740.81..2,740.81 rows=58,981 width=54) (actual time=150.003..150.003 rows=58,985 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 5088kB
8. 82.253 82.253 ↓ 1.0 58,985 1

Seq Scan on empresas_sucursales (cost=0.00..2,740.81 rows=58,981 width=54) (actual time=0.006..82.253 rows=58,985 loops=1)