explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xbBw

Settings
# exclusive inclusive rows x rows loops node
1. 2,685.809 20,576.877 ↓ 1.1 678,930 1

Hash Join (cost=11,717.84..215,274.74 rows=644,140 width=92) (actual time=1,350.259..20,576.877 rows=678,930 loops=1)

  • Hash Cond: (empleado.nropatronal = cabsueldos.nropatronal)
2. 16,540.876 16,540.876 ↓ 1.0 679,885 1

Seq Scan on empleado (cost=0.00..136,317.80 rows=675,530 width=42) (actual time=0.046..16,540.876 rows=679,885 loops=1)

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

Hash (cost=11,212.57..11,212.57 rows=40,421 width=58) (actual time=1,350.192..1,350.192 rows=41,469 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 3686kB
4. 275.758 1,236.246 ↓ 1.0 41,469 1

Hash Left Join (cost=3,478.61..11,212.57 rows=40,421 width=58) (actual time=698.735..1,236.246 rows=41,469 loops=1)

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

Seq Scan on cabsueldos (cost=0.00..6,875.01 rows=40,421 width=8) (actual time=0.624..262.437 rows=41,469 loops=1)

  • Filter: ((anho = 2018) AND (confirmado = 1))
  • Rows Removed by Filter: 238132
6. 192.350 698.051 ↓ 1.0 59,006 1

Hash (cost=2,741.05..2,741.05 rows=59,005 width=54) (actual time=698.051..698.051 rows=59,006 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 5090kB
7. 505.701 505.701 ↓ 1.0 59,006 1

Seq Scan on empresas_sucursales (cost=0.00..2,741.05 rows=59,005 width=54) (actual time=0.031..505.701 rows=59,006 loops=1)