explain.depesz.com

A tool for finding a real cause for slow queries.

Result: eGo

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Append (cost=1,350.51..9,036.64 rows=130 width=255) (actual time=.. rows= loops=)

2.          

CTE afiliados

3. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,318.87..1,350.51 rows=129 width=167) (actual time=.. rows= loops=)

  • Hash Cond: (((dados.prefdep)::bpchar = (mob.es_prefixo)::bpchar) AND (dados.es_cnpj = mob.es_cpf_cnpj))
4.          

CTE dados

5. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.00..241.67 rows=130 width=86) (actual time=.. rows= loops=)

6. 0.000 0.000 ↓ 0.0

Index Scan using tbldependenciasbr_pkey on tbldependenciasbr d (cost=0.00..8.28 rows=1 width=5) (actual time=.. rows= loops=)

  • Index Cond: ((prefdep)::text = '0018'::text)
7. 0.000 0.000 ↓ 0.0

Index Scan using afiliacao_cielo_mob_diretor_publico_alvo_pkey on afiliacao_cielo_mob_diretor_publico_alvo alvo (cost=0.00..231.77 rows=130 width=86) (actual time=.. rows= loops=)

  • Index Cond: ((d.prefdep)::bpchar = (alvo.es_prefixo)::bpchar)
8. 0.000 0.000 ↓ 0.0

CTE Scan on dados (cost=0.00..2.60 rows=129 width=152) (actual time=.. rows= loops=)

  • Filter: (es_razao_social IS NOT NULL)
9. 0.000 0.000 ↓ 0.0

Hash (cost=668.48..668.48 rows=27,248 width=35) (actual time=.. rows= loops=)

10. 0.000 0.000 ↓ 0.0

Seq Scan on afiliacao_cielo_mob_diretor mob (cost=0.00..668.48 rows=27,248 width=35) (actual time=.. rows= loops=)

11. 0.000 0.000 ↓ 0.0

Subquery Scan on "*SELECT* 1" (cost=0.00..3.87 rows=129 width=256) (actual time=.. rows= loops=)

12. 0.000 0.000 ↓ 0.0

CTE Scan on afiliados (cost=0.00..2.58 rows=129 width=256) (actual time=.. rows= loops=)

13. 0.000 0.000 ↓ 0.0

Subquery Scan on "*SELECT* 2" (cost=6,860.73..7,682.26 rows=1 width=76) (actual time=.. rows= loops=)

14. 0.000 0.000 ↓ 0.0

Hash Anti Join (cost=6,860.73..7,682.25 rows=1 width=76) (actual time=.. rows= loops=)

  • Hash Cond: (afiliacao_cielo_mob_diretor.es_cpf_cnpj = afiliacao_cielo_mob_diretor_publico_alvo.es_cnpj)
15.          

Initplan (forHash Anti Join)

16. 0.000 0.000 ↓ 0.0

Limit (cost=0.00..0.02 rows=1 width=20) (actual time=.. rows= loops=)

17. 0.000 0.000 ↓ 0.0

CTE Scan on afiliados (cost=0.00..2.58 rows=129 width=20) (actual time=.. rows= loops=)

18. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.00..25.46 rows=6 width=76) (actual time=.. rows= loops=)

19. 0.000 0.000 ↓ 0.0

Index Scan using tbldependenciasbr_pkey on tbldependenciasbr d (cost=0.00..8.28 rows=1 width=5) (actual time=.. rows= loops=)

  • Index Cond: ((prefdep)::text = ($2)::text)
20. 0.000 0.000 ↓ 0.0

Index Scan using afiliacao_cielo_mob_diretor_pkey on afiliacao_cielo_mob_diretor (cost=0.00..17.11 rows=6 width=76) (actual time=.. rows= loops=)

  • Index Cond: ((afiliacao_cielo_mob_diretor.es_prefixo)::bpchar = (d.prefdep)::bpchar)
21. 0.000 0.000 ↓ 0.0

Hash (cost=4,035.76..4,035.76 rows=162,476 width=15) (actual time=.. rows= loops=)

22. 0.000 0.000 ↓ 0.0

Seq Scan on afiliacao_cielo_mob_diretor_publico_alvo (cost=0.00..4,035.76 rows=162,476 width=15) (actual time=.. rows= loops=)