explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IASU

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

Nested Loop (cost=838.48..4,613,933.97 rows=211,562,971 width=1,938) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Seq Scan on tb_competencia cp (cost=0.00..2.02 rows=68 width=85) (actual rows= loops=)

  • Filter: (((ds_tipo_servidor_protocola)::text = 'TD'::text) OR ((ds_tipo_servidor_protocola)::text = 'AOJ'::text))
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=838.48..5,609.80 rows=1,774 width=1,715) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Hash Join (cost=837.88..2,566.73 rows=1,774 width=981) (actual rows= loops=)

  • Hash Cond: ((ccls.id_competencia)::integer = (ojcp.id_competencia)::integer)
5. 0.000 0.000 ↓ 0.0

Index Scan using idx_tb_competencia_classe_assunto1 on tb_competencia_cl_assunto ccls (cost=0.42..136.06 rows=4,181 width=37) (actual rows= loops=)

  • Index Cond: ((id_competencia)::integer = (cp.id_competencia)::integer)
  • Filter: ((id_classe_aplicacao)::integer IS NOT NULL)
6. 0.000 0.000 ↓ 0.0

Hash (cost=824.96..824.96 rows=1,000 width=944) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=79.17..824.96 rows=1,000 width=944) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

HashAggregate (cost=67.84..68.42 rows=58 width=4) (actual rows= loops=)

  • Group Key: (ojcp.id_competencia)::integer
9. 0.000 0.000 ↓ 0.0

Seq Scan on tb_org_julg_competencia ojcp (cost=0.00..62.35 rows=2,197 width=4) (actual rows= loops=)

  • Filter: (((dt_fim)::timestamp without time zone >= CURRENT_DATE) OR (dt_fim IS NULL))
10. 0.000 0.000 ↓ 0.0

Materialize (cost=11.33..34.03 rows=1,000 width=940) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Hash Join (cost=11.33..29.03 rows=1,000 width=940) (actual rows= loops=)

  • Hash Cond: (jd.id_aplicacao = ac.id_aplicacao_classe)
12. 0.000 0.000 ↓ 0.0

Seq Scan on tb_jurisdicao jd (cost=0.00..3.63 rows=163 width=42) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Hash (cost=10.75..10.75 rows=46 width=898) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Hash Join (cost=8.62..10.75 rows=46 width=898) (actual rows= loops=)

  • Hash Cond: (ac.id_aplicacao_classe = (ca.id_aplicacao_classe)::integer)
15. 0.000 0.000 ↓ 0.0

Seq Scan on tb_aplicabilidade_classe ac (cost=0.00..1.45 rows=45 width=12) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Hash (cost=8.57..8.57 rows=4 width=886) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.89..8.57 rows=4 width=886) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on tb_classe_judicial cj (cost=2.61..3.72 rows=1 width=861) (actual rows= loops=)

  • Recheck Cond: ((cd_classe_judicial)::text = '181'::text)
  • Filter: ((id_fluxo IS NOT NULL) AND ((NOT in_inicial) OR in_recursal OR in_inicial))
19. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx_tb_classe_judicial_cd_classe_judicial (cost=0.00..2.61 rows=1 width=0) (actual rows= loops=)

  • Index Cond: ((cd_classe_judicial)::text = '181'::text)
20. 0.000 0.000 ↓ 0.0

Index Scan using tb_classe_aplicacao_unq on tb_classe_aplicacao ca (cost=0.28..4.81 rows=4 width=25) (actual rows= loops=)

  • Index Cond: ((id_classe_judicial)::integer = (cj.id_classe_judicial)::integer)
21. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on tb_assunto_trf ass (cost=0.60..1.72 rows=1 width=734) (actual rows= loops=)

  • Recheck Cond: ((id_assunto_trf)::integer = (ccls.id_assunto)::integer)
22. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on tb_assunto_pkey (cost=0.00..0.60 rows=1 width=0) (actual rows= loops=)

  • Index Cond: ((id_assunto_trf)::integer = (ccls.id_assunto)::integer)