explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3xH

Settings
# exclusive inclusive rows x rows loops node
1. 1.439 36.971 ↑ 1.0 1,000 1

Limit (cost=14.00..164.30 rows=1,000 width=115) (actual time=16.381..36.971 rows=1,000 loops=1)

2. 2.656 35.532 ↑ 2,270.8 1,000 1

Merge Left Join (cost=14.00..341,289.43 rows=2,270,761 width=115) (actual time=16.379..35.532 rows=1,000 loops=1)

  • Merge Cond: (cabsueldos.nropatronal = empresas_sucursales.nro_patronal)
3. 0.064 0.064 ↑ 3,999.5 10 1

Index Scan using cabsueldos_nropatronal_anho_idx on cabsueldos (cost=0.42..9,363.40 rows=39,995 width=8) (actual time=0.022..0.064 rows=10 loops=1)

  • Index Cond: (anho = 2018)
  • Filter: (confirmado = 1)
4. 3.937 32.812 ↑ 1,529.1 2,190 1

Materialize (cost=13.58..303,885.55 rows=3,348,712 width=111) (actual time=0.059..32.812 rows=2,190 loops=1)

5. 3.477 28.875 ↑ 1,529.1 2,190 1

Merge Left Join (cost=13.58..295,513.77 rows=3,348,712 width=111) (actual time=0.055..28.875 rows=2,190 loops=1)

  • Merge Cond: (empresas_sucursales.nro_patronal = empleado.nropatronal)
6. 0.339 0.339 ↑ 3,104.3 19 1

Index Scan using empresas_sucursales_nro_patronal_key on empresas_sucursales (cost=0.29..5,510.72 rows=58,981 width=100) (actual time=0.039..0.339 rows=19 loops=1)

7. 25.059 25.059 ↑ 1,534.0 2,183 1

Index Scan using unkempleado on empleado (cost=0.43..247,996.70 rows=3,348,712 width=31) (actual time=0.010..25.059 rows=2,183 loops=1)