explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4Dr7

Settings
# exclusive inclusive rows x rows loops node
1. 1.693 15.734 ↑ 1.0 1,000 1

Limit (cost=18.48..414.78 rows=1,000 width=92) (actual time=0.403..15.734 rows=1,000 loops=1)

2. 1.681 14.041 ↑ 641.2 1,000 1

Merge Join (cost=18.48..254,135.88 rows=641,214 width=92) (actual time=0.401..14.041 rows=1,000 loops=1)

  • Merge Cond: (cabsueldos.nropatronal = empleado.nropatronal)
3. 0.127 0.928 ↑ 1,729.9 23 1

Merge Left Join (cost=0.71..15,443.69 rows=39,788 width=58) (actual time=0.153..0.928 rows=23 loops=1)

  • Merge Cond: (cabsueldos.nropatronal = empresas_sucursales.nro_patronal)
4. 0.126 0.126 ↑ 1,729.9 23 1

Index Scan using cabsueldos_nropatronal_anho_idx on cabsueldos (cost=0.42..9,365.92 rows=39,788 width=8) (actual time=0.024..0.126 rows=23 loops=1)

  • Index Cond: (anho = 2018)
  • Filter: (confirmado = 1)
  • Rows Removed by Filter: 1
5. 0.675 0.675 ↑ 1,552.8 38 1

Index Scan using empresas_sucursales_nro_patronal_key on empresas_sucursales (cost=0.29..5,511.93 rows=59,005 width=54) (actual time=0.051..0.675 rows=38 loops=1)

6. 11.432 11.432 ↑ 683.2 1,000 1

Index Scan using empleado_nropatronal_documento_anho_idx on empleado (cost=0.43..230,493.62 rows=683,223 width=42) (actual time=0.243..11.432 rows=1,000 loops=1)

  • Index Cond: (anho = 2018)