explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.666 120.724 ↓ 0.0 0 1

Update on episodios_alta_diagnosticos (cost=0.42..56.09 rows=28 width=26) (actual time=120.724..120.724 rows=0 loops=1)

2. 0.317 120.058 ↓ 1.0 29 1

Index Scan using episodios_alta_diagnosticos_pkey on episodios_alta_diagnosticos episodios_alta_diagnosticos (cost=0.42..56.09 rows=28 width=26) (actual time=7.41..120.058 rows=29 loops=1)

  • Index Cond: (id < 386655)
3.          

SubPlan (for Index Scan)

4. 0.174 119.741 ↑ 1.0 1 29

Limit (cost=0..1.68 rows=1 width=4) (actual time=4.127..4.129 rows=1 loops=29)

5. 119.567 119.567 ↑ 11,528.0 1 29

Seq Scan on cies cies (cost=0..19,335.61 rows=11,528 width=4) (actual time=4.123..4.123 rows=1 loops=29)

  • Filter: ((diagnostico_procedimiento = 'D'::bpchar) AND (random() < '0.0100000000000000002'::double precision) AND (CASE WHEN (episodios_alta_diagnosticos.orden > '-1'::integer) THEN 6 ELSE 0 END = id_cie_version))
Planning time : 0.716 ms
Execution time : 126.181 ms
Trigger times:
Trigger Name:Total time:Calls:Average time:
RI_ConstraintTrigger_c_125443 5.317 ms 29 0.183 ms