explain.depesz.com

PostgreSQL's explain analyze made readable

Result: y68O

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

Hash Join (cost=8,958.31..213,412.73 rows=615,274 width=92) (actual time=342.882..3,519.754 rows=678,869 loops=1)

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

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

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

Hash (cost=8,460.87..8,460.87 rows=39,795 width=58) (actual time=342.833..342.833 rows=41,466 loops=1)

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

Hash Left Join (cost=4,310.09..8,460.87 rows=39,795 width=58) (actual time=156.586..299.337 rows=41,466 loops=1)

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

Bitmap Heap Scan on cabsueldos (cost=832.02..4,137.15 rows=39,795 width=8) (actual time=6.616..55.103 rows=41,466 loops=1)

  • Recheck Cond: (anho = 2018)
  • Filter: (confirmado = 1)
  • Rows Removed by Filter: 642
6. 6.388 6.388 ↓ 1.0 42,108 1

Bitmap Index Scan on cabsueldos_anho_idx (cost=0.00..822.07 rows=41,609 width=0) (actual time=6.388..6.388 rows=42,108 loops=1)

  • Index Cond: (anho = 2018)
7. 67.282 149.937 ↑ 1.0 58,981 1

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

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

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