explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bkBd

Settings
# exclusive inclusive rows x rows loops node
1. 1,405.850 5,893.444 ↓ 1.0 678,869 1

Hash Join (cost=8,977.52..225,526.37 rows=650,530 width=79) (actual time=466.236..5,893.444 rows=678,869 loops=1)

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

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

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

Hash (cost=8,477.58..8,477.58 rows=39,995 width=49) (actual time=466.169..466.169 rows=41,467 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 3378kB
4. 155.486 407.688 ↓ 1.0 41,467 1

Hash Join (cost=4,316.94..8,477.58 rows=39,995 width=49) (actual time=183.430..407.688 rows=41,467 loops=1)

  • Hash Cond: (cabsueldos.nropatronal = empresas_sucursales.nro_patronal)
5. 69.024 79.645 ↓ 1.0 41,467 1

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

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

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

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

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

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

Seq Scan on empresas_sucursales (cost=0.00..2,740.81 rows=58,981 width=41) (actual time=0.022..101.389 rows=58,987 loops=1)