explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rZNC

Settings
# exclusive inclusive rows x rows loops node
1. 0.255 1,017.088 ↑ 1.0 2,504 1

Append (cost=0.00..74,907.49 rows=2,504 width=95) (actual time=0.003..1,017.088 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.000 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.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)

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.000 0.001 ↑ 1.0 1 1

Subquery Scan "*SELECT* 4" (cost=0.00..0.02 rows=1 width=0) (actual time=0.001..0.001 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.568 1,016.807 ↑ 1.0 2,500 1

Subquery Scan "*SELECT* 5" (cost=53,361.71..74,907.41 rows=2,500 width=95) (actual time=621.233..1,016.807 rows=2,500 loops=1)

11. 0.199 1,016.239 ↑ 1.0 2,500 1

Limit (cost=53,361.71..74,882.41 rows=2,500 width=95) (actual time=621.229..1,016.239 rows=2,500 loops=1)

12. 98.346 1,016.040 ↑ 2.3 2,500 1

Hash Join (cost=53,361.71..103,909.53 rows=5,872 width=95) (actual time=621.229..1,016.040 rows=2,500 loops=1)

  • Hash Cond: (cp.conparseq = cpc.conparseq)
13. 31.304 736.221 ↓ 2.6 123,382 1

Hash Left Join (cost=41,781.05..84,478.36 rows=47,794 width=97) (actual time=428.108..736.221 rows=123,382 loops=1)

  • Hash Cond: (cp.conparacocod = acr.acocod)
14. 54.108 703.788 ↓ 2.6 123,382 1

Nested Loop (cost=41,689.12..83,850.17 rows=47,794 width=61) (actual time=426.942..703.788 rows=123,382 loops=1)

15. 7.117 478.630 ↓ 2.2 15,550 1

Hash Join (cost=41,689.12..72,110.83 rows=7,081 width=47) (actual time=426.894..478.630 rows=15,550 loops=1)

  • Hash Cond: (d.carcod = car.carcod)
16. 34.904 471.428 ↑ 10.5 15,550 1

Hash Join (cost=41,683.92..69,855.65 rows=163,636 width=35) (actual time=426.770..471.428 rows=15,550 loops=1)

  • Hash Cond: ((c.carcod = d.carcod) AND (c.devcod = d.devcod))
17. 10.217 10.217 ↑ 12.1 31,034 1

Seq Scan on contrato c (cost=0.00..12,857.05 rows=375,305 width=31) (actual time=0.018..10.217 rows=31,034 loops=1)

18. 235.211 426.307 ↑ 1.0 657,917 1

Hash (cost=27,960.17..27,960.17 rows=657,917 width=20) (actual time=426.307..426.307 rows=657,917 loops=1)

19. 191.096 191.096 ↑ 1.0 657,917 1

Seq Scan on devedor d (cost=0.00..27,960.17 rows=657,917 width=20) (actual time=0.072..191.096 rows=657,917 loops=1)

20. 0.021 0.085 ↑ 1.3 40 1

Hash (cost=4.53..4.53 rows=53 width=20) (actual time=0.085..0.085 rows=40 loops=1)

21. 0.064 0.064 ↑ 1.3 40 1

Seq Scan on carteira car (cost=0.00..4.53 rows=53 width=20) (actual time=0.050..0.064 rows=40 loops=1)

22. 171.050 171.050 ↑ 1.4 8 15,550

Index Scan using contrato_parcela_iu0008 on contrato_parcela cp (cost=0.00..1.52 rows=11 width=30) (actual time=0.005..0.011 rows=8 loops=15,550)

  • Index Cond: (cp.concod = c.concod)
23. 0.218 1.129 ↑ 1.0 534 1

Hash (cost=84.96..84.96 rows=558 width=44) (actual time=1.129..1.129 rows=534 loops=1)

24. 0.315 0.911 ↑ 1.0 534 1

Hash Left Join (cost=49.71..84.96 rows=558 width=44) (actual time=0.498..0.911 rows=534 loops=1)

  • Hash Cond: (acr.acousuinc = usu.usucod)
25. 0.127 0.127 ↑ 1.0 534 1

Seq Scan on acordo acr (cost=0.00..27.58 rows=558 width=22) (actual time=0.007..0.127 rows=534 loops=1)

26. 0.237 0.469 ↑ 1.2 754 1

Hash (cost=38.76..38.76 rows=876 width=24) (actual time=0.469..0.469 rows=754 loops=1)

27. 0.232 0.232 ↑ 1.2 754 1

Seq Scan on usuario usu (cost=0.00..38.76 rows=876 width=24) (actual time=0.005..0.232 rows=754 loops=1)

28. 90.511 181.473 ↑ 1.0 311,010 1

Hash (cost=7,690.29..7,690.29 rows=311,229 width=14) (actual time=181.473..181.473 rows=311,010 loops=1)

29. 90.962 90.962 ↑ 1.0 311,010 1

Seq Scan on contrato_parcela_calculo cpc (cost=0.00..7,690.29 rows=311,229 width=14) (actual time=0.079..90.962 rows=311,010 loops=1)

Total runtime : 1,021.380 ms