explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GuIR : Optimization for: plan #8kZ9

Settings

Optimization path:

Optimization(s) for this plan:

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

Nested Loop Left Join (cost=5.20..108.40 rows=1 width=478) (actual rows= loops=)

  • Join Filter: (((s.ano_mes_referencia)::text = (lot.ano_mes_referencia)::text) AND ((s.lotacao)::text = (lot.lotacao)::text) AND ((s.orgao_lotacao)::text = (lot.orgao_id)::text))
2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=4.78..99.91 rows=1 width=370) (actual rows= loops=)

  • Join Filter: ((cpl.orgao_origem)::text = (orgorig.id)::text)
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=4.50..91.60 rows=1 width=355) (actual rows= loops=)

  • Join Filter: ((m.matricula)::text = (cpl.matricula)::text)
4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=4.07..83.21 rows=1 width=295) (actual rows= loops=)

  • Join Filter: (((m.ano_mes_referencia)::text = (ct.ano_mes_referencia)::text) AND ((m.matricula)::text = (ct.matricula)::text))
5. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=3.64..74.79 rows=1 width=291) (actual rows= loops=)

  • Join Filter: (((s.ano_mes_referencia)::text = (pes.ano_mes_referencia)::text) AND ((s.plano)::text = (pes.plano)::text) AND ((s.plano_grupo)::text = (pes.grupo)::text) AND ((s.plano_cargo)::text = (pes.cargo)::text) AND ((s.plano_classe)::text = (pes.classe)::text) AND ((s.plano_especialidade)::text = (pes.especialidade)::text))
6. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=3.23..66.34 rows=1 width=280) (actual rows= loops=)

  • Join Filter: (((s.ano_mes_referencia)::text = (p.ano_mes_referencia)::text) AND ((s.plano)::text = (p.plano)::text) AND ((s.plano_grupo)::text = (p.grupo)::text) AND ((s.plano_cargo)::text = (p.cargo)::text) AND ((s.plano_classe)::text = (p.classe)::text) AND ((s.plano_padrao)::text = (p.padrao)::text))
7. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=2.81..57.93 rows=1 width=277) (actual rows= loops=)

  • Join Filter: (((ci.ano_mes_referencia)::text = (s.ano_mes_referencia)::text) AND ((ci.id)::text = (s.cidade_id)::text))
8. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=2.53..49.61 rows=1 width=262) (actual rows= loops=)

  • Join Filter: (((s.ano_mes_referencia)::text = (orglot.ano_mes_referencia)::text) AND ((s.orgao_lotacao)::text = (orglot.id)::text))
9. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=2.24..41.29 rows=1 width=236) (actual rows= loops=)

  • Join Filter: (((c.ano_mes_referencia)::text = (s.ano_mes_referencia)::text) AND ((c.id)::text = (s.cargo_id)::text))
10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.82..32.93 rows=1 width=218) (actual rows= loops=)

  • Join Filter: ((m.orgao_id)::text = (orgmov.id)::text)
11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.54..24.62 rows=1 width=200) (actual rows= loops=)

  • Join Filter: ((m.financeiro_id)::text = (f.id)::text)
12. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.12..16.17 rows=1 width=180) (actual rows= loops=)

  • Join Filter: (((m.matricula)::text = (s.matricula)::text) AND ((m.orgao_id)::text = (s.orgao_id)::text))
13. 0.000 0.000 ↓ 0.0

Index Scan using movimento_ano_mes_referencia_idx on movimento m (cost=0.56..7.65 rows=1 width=34) (actual rows= loops=)

  • Index Cond: ((ano_mes_referencia)::text = '201910'::text)
14. 0.000 0.000 ↓ 0.0

Index Scan using serv_ano_mes_mat_orgao_idx on servidor s (cost=0.56..8.51 rows=1 width=146) (actual rows= loops=)

  • Index Cond: ((ano_mes_referencia)::text = '201910'::text)
15. 0.000 0.000 ↓ 0.0

Index Scan using fin_ano_mes_id_idx on financeiro f (cost=0.41..8.43 rows=1 width=32) (actual rows= loops=)

  • Index Cond: ((ano_mes_referencia)::text = '201910'::text)
16. 0.000 0.000 ↓ 0.0

Index Scan using orgao_ano_mes_id_idx on orgao orgmov (cost=0.29..8.30 rows=1 width=33) (actual rows= loops=)

  • Index Cond: ((ano_mes_referencia)::text = '201910'::text)
17. 0.000 0.000 ↓ 0.0

Index Scan using cargo_ano_mes_referencia_idx on cargo c (cost=0.42..8.34 rows=1 width=30) (actual rows= loops=)

  • Index Cond: ((ano_mes_referencia)::text = '201910'::text)
18. 0.000 0.000 ↓ 0.0

Index Scan using orgao_ano_mes_id_idx on orgao orglot (cost=0.29..8.30 rows=1 width=33) (actual rows= loops=)

  • Index Cond: ((ano_mes_referencia)::text = '201910'::text)
19. 0.000 0.000 ↓ 0.0

Index Scan using cidade_ano_mes_referencia_idx on cidade ci (cost=0.29..8.30 rows=1 width=26) (actual rows= loops=)

  • Index Cond: ((ano_mes_referencia)::text = '201910'::text)
20. 0.000 0.000 ↓ 0.0

Index Scan using planopadrao_ano_mes_referencia_idx on planopadrao p (cost=0.41..8.38 rows=1 width=28) (actual rows= loops=)

  • Index Cond: ((ano_mes_referencia)::text = '201910'::text)
21. 0.000 0.000 ↓ 0.0

Index Scan using planoespecialidade_ano_mes_referencia_idx on planoespecialidade pes (cost=0.41..8.43 rows=1 width=41) (actual rows= loops=)

  • Index Cond: ((ano_mes_referencia)::text = '201910'::text)
22. 0.000 0.000 ↓ 0.0

Index Scan using contrato_temporario_ano_mes_referencia_idx on contrato_temporario ct (cost=0.42..8.40 rows=1 width=19) (actual rows= loops=)

  • Index Cond: ((ano_mes_referencia)::text = '201910'::text)
23. 0.000 0.000 ↓ 0.0

Index Scan using cpl_ano_mes_mat_idx on complementar cpl (cost=0.43..8.38 rows=1 width=83) (actual rows= loops=)

  • Index Cond: ((ano_mes_referencia)::text = '201910'::text)
24. 0.000 0.000 ↓ 0.0

Index Scan using orgao_ano_mes_id_idx on orgao orgorig (cost=0.29..8.30 rows=1 width=33) (actual rows= loops=)

  • Index Cond: ((ano_mes_referencia)::text = '201910'::text)
25. 0.000 0.000 ↓ 0.0

Index Scan using lotacao_ano_mes_referencia_idx on lotacao lot (cost=0.42..8.44 rows=1 width=41) (actual rows= loops=)

  • Index Cond: ((ano_mes_referencia)::text = '201910'::text)