explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ra9T

Settings
# exclusive inclusive rows x rows loops node
1. 3.462 11.566 ↑ 1.0 1,000 1

Limit (cost=3.86..392.91 rows=1,000 width=92) (actual time=1.429..11.566 rows=1,000 loops=1)

2. 1.706 8.104 ↑ 653.7 1,000 1

Merge Join (cost=3.86..254,310.90 rows=653,661 width=92) (actual time=1.427..8.104 rows=1,000 loops=1)

  • Merge Cond: (cabsueldos.nropatronal = empleado.nropatronal)
3. 0.110 2.135 ↑ 1,786.7 23 1

Merge Left Join (cost=0.71..15,490.36 rows=41,093 width=58) (actual time=1.237..2.135 rows=23 loops=1)

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

Index Scan using uniq1 on cabsueldos (cost=0.42..9,389.57 rows=41,093 width=8) (actual time=0.020..0.119 rows=23 loops=1)

  • Index Cond: (anho = 2018)
  • Filter: (confirmado = 1)
  • Rows Removed by Filter: 1
5. 1.906 1.906 ↑ 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=1.149..1.906 rows=38 loops=1)

6. 4.263 4.263 ↑ 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.185..4.263 rows=1,000 loops=1)

  • Index Cond: (anho = 2018)