explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vNJO : Optimization for: plan #dRPu

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.291 16.769 ↓ 500.8 2,504 1

Append (cost=0.00..9,911.20 rows=5 width=19) (actual time=0.002..16.769 rows=2,504 loops=1)

2. 0.001 0.002 ↑ 1.0 1 1

Subquery Scan "*SELECT* 1" (cost=0.00..0.02 rows=1 width=0) (actual time=0.002..0.002 rows=1 loops=1)

3. 0.001 0.001 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)

4. 0.001 0.001 ↑ 1.0 1 1

Subquery Scan "*SELECT* 2" (cost=0.00..0.02 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)

5. 0.000 0.000 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.000..0.000 rows=1 loops=1)

6. 0.001 0.022 ↑ 1.0 1 1

Subquery Scan "*SELECT* 3" (cost=0.00..0.03 rows=1 width=0) (actual time=0.022..0.022 rows=1 loops=1)

7. 0.021 0.021 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.021..0.021 rows=1 loops=1)

8. 0.001 0.002 ↑ 1.0 1 1

Subquery Scan "*SELECT* 4" (cost=0.00..0.02 rows=1 width=0) (actual time=0.001..0.002 rows=1 loops=1)

9. 0.001 0.001 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)

10. 0.602 16.451 ↓ 2,500.0 2,500 1

Subquery Scan "*SELECT* 5" (cost=0.00..9,911.12 rows=1 width=95) (actual time=0.592..16.451 rows=2,500 loops=1)

11. 0.212 15.849 ↓ 2,500.0 2,500 1

Limit (cost=0.00..9,911.11 rows=1 width=95) (actual time=0.591..15.849 rows=2,500 loops=1)

12. 11.241 15.637 ↓ 2,500.0 2,500 1

Nested Loop (cost=0.00..9,911.11 rows=1 width=95) (actual time=0.590..15.637 rows=2,500 loops=1)

13. 0.122 2.768 ↓ 148.0 148 1

Nested Loop Left Join (cost=0.00..9,910.11 rows=1 width=97) (actual time=0.379..2.768 rows=148 loops=1)

14. 0.114 2.350 ↓ 148.0 148 1

Nested Loop (cost=0.00..9,909.58 rows=1 width=75) (actual time=0.362..2.350 rows=148 loops=1)

15. 0.118 1.940 ↓ 148.0 148 1

Nested Loop (cost=0.00..9,909.30 rows=1 width=63) (actual time=0.340..1.940 rows=148 loops=1)

16. 0.095 1.170 ↓ 1.2 163 1

Nested Loop (cost=0.00..8,735.56 rows=139 width=57) (actual time=0.098..1.170 rows=163 loops=1)

17. 0.065 0.645 ↑ 13.0 43 1

Nested Loop (cost=0.00..4,422.95 rows=558 width=50) (actual time=0.075..0.645 rows=43 loops=1)

18. 0.064 0.064 ↑ 13.0 43 1

Index Scan using acordo_iu0003 on acordo acr (cost=0.00..86.35 rows=558 width=30) (actual time=0.022..0.064 rows=43 loops=1)

19. 0.516 0.516 ↑ 1.0 1 43

Index Scan using devedor_iu0007 on devedor d (cost=0.00..7.76 rows=1 width=20) (actual time=0.012..0.012 rows=1 loops=43)

  • Index Cond: (d.devcod = acr.devcod)
20. 0.430 0.430 ↓ 4.0 4 43

Index Scan using contrato_iu0005 on contrato c (cost=0.00..7.71 rows=1 width=31) (actual time=0.008..0.010 rows=4 loops=43)

  • Index Cond: ((c.carcod = d.carcod) AND (c.devcod = d.devcod))
21. 0.652 0.652 ↑ 1.0 1 163

Index Scan using contrato_parcela_iu0001 on contrato_parcela cp (cost=0.00..8.43 rows=1 width=30) (actual time=0.003..0.004 rows=1 loops=163)

  • Index Cond: ((cp.conparacocod = acr.acocod) AND (cp.concod = c.concod))
22. 0.296 0.296 ↑ 1.0 1 148

Index Scan using carteira_pkey on carteira car (cost=0.00..0.27 rows=1 width=20) (actual time=0.002..0.002 rows=1 loops=148)

  • Index Cond: (car.carcod = d.carcod)
23. 0.296 0.296 ↑ 1.0 1 148

Index Scan using usuario_pkey on usuario usu (cost=0.00..0.52 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=148)

  • Index Cond: (usu.usucod = acr.acousuinc)
24. 1.628 1.628 ↑ 1.3 17 148

Index Scan using icalculo_parcela3 on contrato_parcela_calculo cpc (cost=0.00..0.68 rows=22 width=14) (actual time=0.004..0.011 rows=17 loops=148)

  • Index Cond: (cpc.conparseq = cp.conparseq)
Total runtime : 17.338 ms