explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oVXl

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 542.312 ↑ 1.0 10 1

Limit (cost=0.43..360.58 rows=10 width=277) (actual time=13.035..542.312 rows=10 loops=1)

2. 6.697 542.309 ↑ 3,233.0 10 1

Index Scan using idevedor3 on devedor dev (cost=0.43..1,164,359.44 rows=32,330 width=277) (actual time=13.034..542.309 rows=10 loops=1)

  • Index Cond: (carcod = 111)
  • Filter: (SubPlan 1)
  • Rows Removed by Filter: 12,163
3.          

SubPlan (for Index Scan)

4. 12.173 535.612 ↓ 0.0 0 12,173

Subquery Scan on x (cost=17.12..17.14 rows=1 width=0) (actual time=0.044..0.044 rows=0 loops=12,173)

  • Filter: ((x.parcela_mais_recente >= '100'::numeric) AND (x.parcela_mais_recente <= '110'::numeric))
  • Rows Removed by Filter: 1
5. 0.000 523.439 ↑ 1.0 1 12,173

Limit (cost=17.12..17.13 rows=1 width=36) (actual time=0.043..0.043 rows=1 loops=12,173)

6. 24.346 523.439 ↑ 1.0 1 12,173

Sort (cost=17.12..17.13 rows=1 width=36) (actual time=0.043..0.043 rows=1 loops=12,173)

  • Sort Key: y.conpardatven DESC
  • Sort Method: quicksort Memory: 25kB
7. 12.173 499.093 ↓ 9.0 9 12,173

Nested Loop (cost=1.83..17.11 rows=1 width=36) (actual time=0.011..0.041 rows=9 loops=12,173)

8. 146.076 146.076 ↑ 1.0 1 12,173

Index Scan using carteira_pkey on carteira car (cost=0.14..2.39 rows=1 width=8) (actual time=0.001..0.012 rows=1 loops=12,173)

  • Index Cond: (carcod = dev.carcod)
9. 71.886 340.844 ↓ 9.0 9 12,173

Nested Loop Left Join (cost=1.69..14.71 rows=1 width=14) (actual time=0.010..0.028 rows=9 loops=12,173)

10. 5.805 158.249 ↓ 9.0 9 12,173

Nested Loop (cost=1.12..13.67 rows=1 width=19) (actual time=0.007..0.013 rows=9 loops=12,173)

11. 48.692 48.692 ↑ 1.0 1 12,173

Index Only Scan using contrato_devcod_carcod_concod_idx on contrato x_1 (cost=0.56..1.68 rows=1 width=12) (actual time=0.003..0.004 rows=1 loops=12,173)

  • Index Cond: ((devcod = dev.devcod) AND (carcod = dev.carcod))
  • Heap Fetches: 17,346
12. 103.752 103.752 ↓ 2.0 6 17,292

Index Scan using contrato_parcela_iu0007 on contrato_parcela y (cost=0.56..11.96 rows=3 width=23) (actual time=0.003..0.006 rows=6 loops=17,292)

  • Index Cond: ((concod = x_1.concod) AND (conparati = 0))
  • Filter: (conparvalsal > '0'::numeric)
  • Rows Removed by Filter: 0
13. 110.709 110.709 ↓ 0.0 0 110,709

Index Scan using contrato_parcela_detalhe_pkey on contrato_parcela_detalhe z (cost=0.56..1.99 rows=3 width=11) (actual time=0.001..0.001 rows=0 loops=110,709)

  • Index Cond: ((conparseq = y.conparseq) AND (conpardetcod = 95))
Planning time : 1.222 ms
Execution time : 542.378 ms