explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0av

Settings
# exclusive inclusive rows x rows loops node
1. 3,826.627 171,321.388 ↓ 36,432.0 36,432 1

Nested Loop (cost=0.86..10.20 rows=1 width=166) (actual time=0.135..171,321.388 rows=36,432 loops=1)

  • Join Filter: ((mod.rut_med = total_diag.rut_med) AND (mod.cod_suc = total_diag.cod_suc))
  • Rows Removed by Join Filter: 20793664
2. 14.217 14.217 ↓ 18,256.0 18,256 1

Index Scan using mod_plan_foto_idx_periodo on mod_plan_foto mod (cost=0.43..5.09 rows=1 width=83) (actual time=0.093..14.217 rows=18,256 loops=1)

  • Index Cond: ((periodo)::text = to_char((('now'::cstring)::date - '1 mon'::interval), 'YYYYMM'::text))
3. 167,480.544 167,480.544 ↓ 1,141.0 1,141 18,256

Index Scan using mod_plan_foto_idx_periodo on mod_plan_foto total_diag (cost=0.43..5.09 rows=1 width=83) (actual time=0.034..9.174 rows=1,141 loops=18,256)

  • Index Cond: ((periodo)::text = to_char((('now'::cstring)::date - '1 mon'::interval), 'YYYYMM'::text))
  • Filter: (((campo)::text <> 'diag'::text) AND ((nombre)::text = '[TotalD]'::text))
  • Rows Removed by Filter: 17115
Planning time : 22.569 ms
Execution time : 171,333.186 ms