explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QIl9

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Merge Join (cost=474,347.46..138,911,184.34 rows=9,159,868,956 width=216) (actual rows= loops=)

  • Merge Cond: (gc.cd_cliente = e.cd_cliente)
2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.00..205,953.38 rows=33,110 width=54) (actual rows= loops=)

  • Join Filter: (g.cd_grupo = gc.cd_grupo)
3. 0.000 0.000 ↓ 0.0

Index Scan using tb_grupo_cliente_cd_cliente_19f5bbe2 on tb_grupo_cliente gc (cost=0.42..105,952.98 rows=735,237 width=32) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Materialize (cost=0.57..743.43 rows=9 width=38) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.57..743.38 rows=9 width=38) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.29..699.54 rows=138 width=48) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Seq Scan on tb_grupo g (cost=0.00..139.38 rows=138 width=32) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Index Scan using tb_carteira_convenio_pkey on tb_carteira_convenio cc (cost=0.29..4.05 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (cd_carteira_convenio = g.cd_carteira_convenio)
9. 0.000 0.000 ↓ 0.0

Index Scan using tb_convenio_pkey on tb_convenio con (cost=0.28..0.31 rows=1 width=22) (actual rows= loops=)

  • Index Cond: (cd_convenio = cc.cd_convenio)
10. 0.000 0.000 ↓ 0.0

Materialize (cost=474,346.46..1,445,161.38 rows=55,330,036 width=194) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Merge Join (cost=474,346.46..1,306,836.29 rows=55,330,036 width=194) (actual rows= loops=)

  • Merge Cond: (e.cd_cliente = cl.cd_cliente)
12. 0.000 0.000 ↓ 0.0

Sort (cost=11,998.03..12,025.88 rows=11,138 width=32) (actual rows= loops=)

  • Sort Key: e.cd_cliente
13. 0.000 0.000 ↓ 0.0

Seq Scan on tb_endereco e (cost=0.00..11,249.38 rows=11,138 width=32) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Materialize (cost=462,348.42..467,316.10 rows=993,536 width=162) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Sort (cost=462,348.42..464,832.26 rows=993,536 width=162) (actual rows= loops=)

  • Sort Key: cl.cd_cliente
16. 0.000 0.000 ↓ 0.0

Hash Join (cost=152,196.95..200,379.25 rows=993,536 width=162) (actual rows= loops=)

  • Hash Cond: ((cl.nm_identificador)::text = (c.tb_cliente__cd_sacado_legado)::text)
17. 0.000 0.000 ↓ 0.0

Seq Scan on tb_identificador cl (cost=0.00..12,181.94 rows=613,294 width=94) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash (cost=152,192.90..152,192.90 rows=324 width=68) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Seq Scan on carga_boleto_nao_pago c (cost=0.00..152,192.90 rows=324 width=68) (actual rows= loops=)

  • Filter: (((tb_convenio__nr_convenio)::text = '12072'::text) AND ((tb_pagamento_boleto__nr_boleto_nosso)::text = ANY ('{10409,10408,10407}'::text[])))