explain.depesz.com

PostgreSQL's explain analyze made readable

Result: raCd : Optimization for: Optimization for: Optimization for: plan #K1Vh; plan #6HnL; plan #tefw

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.683 1,838.645 ↓ 0.0 0 1

Update on episodios_alta_diagnosticos (cost=0.42..23.28 rows=28 width=26) (actual time=1,838.645..1,838.645 rows=0 loops=1)

2. 0.261 1,837.962 ↓ 1.0 29 1

Index Scan using episodios_alta_diagnosticos_pkey on episodios_alta_diagnosticos episodios_alta_diagnosticos (cost=0.42..23.28 rows=28 width=26) (actual time=76.055..1,837.962 rows=29 loops=1)

  • Index Cond: (id < 386655)
3.          

SubPlan (for Index Scan)

4. 0.174 1,837.701 ↑ 1.0 1 29

Limit (cost=0..0.51 rows=1 width=4) (actual time=63.367..63.369 rows=1 loops=29)

5. 1,837.527 1,837.527 ↑ 34,585.0 1 29

Seq Scan on cies cies (cost=0..17,484.59 rows=34,585 width=4) (actual time=63.363..63.363 rows=1 loops=29)

  • Filter: ((diagnostico_procedimiento = 'D'::bpchar) AND (CASE WHEN (episodios_alta_diagnosticos.orden > '-1'::integer) THEN 6 ELSE 0 END = id_cie_version))
Planning time : 0.204 ms
Execution time : 1,842.802 ms
Trigger times:
Trigger Name:Total time:Calls:Average time:
RI_ConstraintTrigger_c_125443 4.104 ms 29 0.142 ms