explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Dk6u

Settings
# exclusive inclusive rows x rows loops node
1. 1,129.462 3,536.187 ↓ 1.0 678,869 1

Hash Join (cost=9,956.68..228,162.36 rows=656,433 width=139) (actual time=337.338..3,536.187 rows=678,869 loops=1)

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

Seq Scan on empleado (cost=0.00..136,421.89 rows=699,716 width=42) (actual time=0.035..2,069.467 rows=679,824 loops=1)

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

Hash (cost=9,456.10..9,456.10 rows=40,046 width=105) (actual time=337.258..337.258 rows=41,466 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 5662kB
4. 97.006 290.518 ↓ 1.0 41,466 1

Hash Left Join (cost=3,478.49..9,456.10 rows=40,046 width=105) (actual time=154.976..290.518 rows=41,466 loops=1)

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

Index Only Scan using cabsueldos_nropatronal_anho_idx on cabsueldos (cost=0.42..5,127.05 rows=40,046 width=8) (actual time=0.022..38.627 rows=41,466 loops=1)

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

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

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

Seq Scan on empresas_sucursales (cost=0.00..2,740.81 rows=58,981 width=97) (actual time=0.004..78.773 rows=58,981 loops=1)