explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EZBj

Settings
# exclusive inclusive rows x rows loops node
1. 1,503.283 6,612.856 ↓ 1.0 678,869 1

Hash Left Join (cost=8,127.63..238,500.24 rows=650,530 width=122) (actual time=420.697..6,612.856 rows=678,869 loops=1)

  • Hash Cond: (empleado.nropatronal = empresas_sucursales.nro_patronal)
2. 1,424.887 4,875.580 ↓ 1.0 678,869 1

Hash Join (cost=4,649.55..221,198.40 rows=650,530 width=46) (actual time=186.618..4,875.580 rows=678,869 loops=1)

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

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

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

Hash (cost=4,149.62..4,149.62 rows=39,995 width=8) (actual time=186.410..186.410 rows=41,467 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 1620kB
5. 109.503 122.798 ↓ 1.0 41,467 1

Bitmap Heap Scan on cabsueldos (cost=838.87..4,149.62 rows=39,995 width=8) (actual time=13.525..122.798 rows=41,467 loops=1)

  • Recheck Cond: (anho = 2018)
  • Filter: (confirmado = 1)
  • Rows Removed by Filter: 646
6. 13.295 13.295 ↓ 1.0 42,113 1

Bitmap Index Scan on cabsueldos_anho_idx (cost=0.00..828.87 rows=41,983 width=0) (actual time=13.295..13.295 rows=42,113 loops=1)

  • Index Cond: (anho = 2018)
7. 97.510 233.993 ↓ 1.0 58,987 1

Hash (cost=2,740.81..2,740.81 rows=58,981 width=100) (actual time=233.993..233.993 rows=58,987 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 7875kB
8. 136.483 136.483 ↓ 1.0 58,987 1

Seq Scan on empresas_sucursales (cost=0.00..2,740.81 rows=58,981 width=100) (actual time=0.029..136.483 rows=58,987 loops=1)