explain.depesz.com

PostgreSQL's explain analyze made readable

Result: r1ID

Settings
# exclusive inclusive rows x rows loops node
1. 0.039 3.066 ↑ 22.5 2 1

Sort (cost=472.66..472.77 rows=45 width=488) (actual time=3.066..3.066 rows=2 loops=1)

  • Sort Key: b.btcr_fecha DESC, b.btcr_id DESC
  • Sort Method: quicksort Memory: 26kB
2. 0.001 3.027 ↑ 22.5 2 1

Append (cost=11.49..470.97 rows=45 width=488) (actual time=2.774..3.027 rows=2 loops=1)

3. 1.094 2.993 ↑ 22.0 2 1

Nested Loop (cost=11.49..420.02 rows=44 width=331) (actual time=2.774..2.993 rows=2 loops=1)

4.          

Initplan (forNested Loop)

5. 0.086 0.086 ↓ 0.0 0 1

Index Only Scan using wfa_padre_hijos_pk on wfa_padre_hijos wfa_padre_hijos1 (cost=0.42..10.63 rows=3 width=6) (actual time=0.086..0.086 rows=0 loops=1)

  • Index Cond: (wfa_padre = '895541'::numeric)
  • Heap Fetches: 0
6. 1.795 1.795 ↑ 22.0 2 1

Index Scan using btcr_caso_fk_i on bitacoras b (cost=0.43..13.61 rows=44 width=139) (actual time=1.786..1.795 rows=2 loops=1)

  • Index Cond: (caso_id = ANY (ARRAY[$1, '895541'::numeric]))
7. 0.018 0.018 ↑ 1.0 1 2

Index Only Scan using caso_pk on casos ca (cost=0.43..7.44 rows=1 width=6) (actual time=0.009..0.009 rows=1 loops=2)

  • Index Cond: (caso_id = (b.caso_id + '0'::numeric))
  • Heap Fetches: 2
8. 0.001 0.033 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=12.45..50.51 rows=1 width=387) (actual time=0.033..0.033 rows=0 loops=1)

9. 0.001 0.032 ↓ 0.0 0 1

Nested Loop (cost=12.45..50.50 rows=1 width=387) (actual time=0.032..0.032 rows=0 loops=1)

10. 0.001 0.028 ↑ 4.0 1 1

Nested Loop (cost=12.16..41.54 rows=4 width=38) (actual time=0.028..0.028 rows=1 loops=1)

11. 0.008 0.022 ↑ 4.0 1 1

HashAggregate (cost=11.73..11.77 rows=4 width=32) (actual time=0.021..0.022 rows=1 loops=1)

  • Group Key: wfa_padre_hijos2.wfa_hijo
12. 0.000 0.014 ↑ 4.0 1 1

Append (cost=0.42..11.68 rows=4 width=32) (actual time=0.013..0.014 rows=1 loops=1)

13. 0.005 0.005 ↓ 0.0 0 1

Index Only Scan using wfa_padre_hijos_pk on wfa_padre_hijos wfa_padre_hijos2 (cost=0.42..10.63 rows=3 width=6) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: (wfa_padre = '895541'::numeric)
  • Heap Fetches: 0
14. 0.002 0.009 ↑ 1.0 1 1

Subquery Scan on *SELECT* 2_1 (cost=0.00..1.02 rows=1 width=32) (actual time=0.008..0.009 rows=1 loops=1)

15. 0.007 0.007 ↑ 1.0 1 1

Seq Scan on dual dual2 (cost=0.00..1.01 rows=1 width=4) (actual time=0.007..0.007 rows=1 loops=1)

16. 0.005 0.005 ↑ 1.0 1 1

Index Only Scan using caso_pk on casos c (cost=0.42..7.44 rows=1 width=6) (actual time=0.005..0.005 rows=1 loops=1)

  • Index Cond: (caso_id = wfa_padre_hijos2.wfa_hijo)
  • Heap Fetches: 1
17. 0.003 0.003 ↓ 0.0 0 1

Index Scan using wfa_actividades_i1 on wfa_actividades act (cost=0.29..0.31 rows=1 width=132) (actual time=0.003..0.003 rows=0 loops=1)

  • Index Cond: (caso_id = c.caso_id)
18.          

SubPlan (forNested Loop)

19. 0.000 0.000 ↓ 0.0 0

Index Scan using wfa_tipo_actividad_pk on wfa_tipo_actividad (cost=0.14..7.16 rows=1 width=516) (never executed)

  • Index Cond: (wfa_tact_id = act.wfa_tact_id)