explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WGnV

Settings
# exclusive inclusive rows x rows loops node
1. 1,186.000 3,724.130 ↓ 1.1 678,869 1

Hash Join (cost=9,971.37..214,701.96 rows=642,890 width=92) (actual time=340.576..3,724.130 rows=678,869 loops=1)

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

Seq Scan on empleado (cost=0.00..136,459.10 rows=677,727 width=42) (actual time=0.059..2,197.636 rows=679,824 loops=1)

  • Filter: (((documento)::text <> '0'::text) AND (anho = 2018))
  • Rows Removed by Filter: 2672835
3. 43.315 340.494 ↓ 1.0 41,466 1

Hash (cost=9,466.78..9,466.78 rows=40,367 width=58) (actual time=340.494..340.494 rows=41,466 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 3686kB
4. 95.685 297.179 ↓ 1.0 41,466 1

Hash Left Join (cost=3,478.49..9,466.78 rows=40,367 width=58) (actual time=160.872..297.179 rows=41,466 loops=1)

  • Hash Cond: (cabsueldos.nropatronal = empresas_sucursales.nro_patronal)
5. 40.672 40.672 ↓ 1.0 41,466 1

Index Only Scan using cabsueldos_nropatronal_anho_idx on cabsueldos (cost=0.42..5,130.91 rows=40,367 width=8) (actual time=0.021..40.672 rows=41,466 loops=1)

  • Index Cond: ((anho = 2018) AND (confirmado = 1))
  • Heap Fetches: 0
6. 77.542 160.822 ↑ 1.0 58,981 1

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

  • Buckets: 8192 Batches: 1 Memory Usage: 5088kB
7. 83.280 83.280 ↑ 1.0 58,981 1

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