explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jBxQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.190 6,958.323 ↑ 1.0 500 1

Hash Left Join (cost=722,191.58..722,203.48 rows=500 width=32) (actual time=6,958.077..6,958.323 rows=500 loops=1)

  • Hash Cond: (aliastransacionadores.numerocpfcnpj = aliasdebitossemtransacionador.numerocpfcnpjdebito)
2.          

CTE aliastransacionadores

3. 13.261 13.261 ↑ 1.0 500 1

CTE Scan on codigostransacionadorcompletos (cost=5,295.52..5,305.52 rows=500 width=250) (actual time=0.060..13.261 rows=500 loops=1)

4.          

CTE transacionadores_pendentes

5. 0.239 0.973 ↑ 1.0 500 1

Limit (cost=0.42..17.77 rows=500 width=9) (actual time=0.024..0.973 rows=500 loops=1)

6. 0.734 0.734 ↑ 153.9 500 1

Index Only Scan using transacionadorcargapendpdv_pk on tb_transacionadorcargapendpdv transacionadorcargapendentepdv (cost=0.42..2,670.58 rows=76,944 width=9) (actual time=0.023..0.734 rows=500 loops=1)

  • Heap Fetches: 0
7.          

CTE codigostransacionadorcompletos

8. 2.653 12.781 ↑ 1.0 500 1

Nested Loop Left Join (cost=0.70..5,277.75 rows=500 width=250) (actual time=0.058..12.781 rows=500 loops=1)

  • Join Filter: (transacionadores_pendentes.codigotransacionador = '0'::numeric)
9. 1.801 7.628 ↑ 1.0 500 1

Nested Loop Left Join (cost=0.29..2,476.75 rows=500 width=94) (actual time=0.041..7.628 rows=500 loops=1)

10. 2.327 2.327 ↑ 1.0 500 1

CTE Scan on transacionadores_pendentes (cost=0.00..10.00 rows=500 width=40) (actual time=0.027..2.327 rows=500 loops=1)

11. 3.500 3.500 ↓ 0.0 0 500

Index Scan using transacionadorbasicopdv_pk on tb_transacionadorbasicopdv transacionadorbasicopdv (cost=0.29..4.92 rows=1 width=54) (actual time=0.007..0.007 rows=0 loops=500)

  • Index Cond: (transacionadores_pendentes.codigotransacionador = cd_transacionador)
  • Filter: (dt_exclusao IS NULL)
12. 2.500 2.500 ↓ 0.0 0 500

Index Scan using transacionadorbasicopdv_idx001 on tb_transacionadorbasicopdv transacionadordocumento (cost=0.41..5.58 rows=1 width=54) (actual time=0.005..0.005 rows=0 loops=500)

  • Index Cond: (transacionadores_pendentes.numerocpfcnpj = nr_cpfcnpj)
  • Filter: (dt_exclusao IS NULL)
13.          

CTE aliasdebitostransacionador

14. 1.144 6,955.064 ↑ 16.4 1,000 1

Nested Loop (cost=0.42..716,475.28 rows=16,431 width=28) (actual time=0.049..6,955.064 rows=1,000 loops=1)

15. 14.420 14.420 ↓ 1.0 500 1

CTE Scan on aliastransacionadores aliastransacionadores_1 (cost=0.00..11.25 rows=498 width=32) (actual time=0.003..14.420 rows=500 loops=1)

  • Filter: (numerocpfcnpj <> '0'::numeric)
16. 6,939.500 6,939.500 ↑ 16.5 2 500

Index Scan using transacionadordebitopdv_pk on tb_transacionadordebitopdv transacionadordebitopdv (cost=0.42..1,438.35 rows=33 width=28) (actual time=0.035..13.879 rows=2 loops=500)

  • Index Cond: (nr_cpfcnpj = aliastransacionadores_1.numerocpfcnpj)
  • Filter: (dt_exclusao IS NULL)
17. 0.143 0.143 ↑ 1.0 500 1

CTE Scan on aliastransacionadores (cost=0.00..10.00 rows=500 width=64) (actual time=0.065..0.143 rows=500 loops=1)

18. 0.925 6,957.990 ↓ 500.0 500 1

Hash (cost=410.78..410.78 rows=1 width=20) (actual time=6,957.990..6,957.990 rows=500 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 28kB
19. 6,957.065 6,957.065 ↓ 500.0 500 1

CTE Scan on aliasdebitostransacionador aliasdebitossemtransacionador (cost=0.00..410.78 rows=1 width=20) (actual time=0.054..6,957.065 rows=500 loops=1)

  • Filter: ((codigotransacionadordebito = '0'::numeric) AND (identificadortipolimitedebito = '2'::numeric))
  • Rows Removed by Filter: 500
Planning time : 1.090 ms
Execution time : 6,958.634 ms