explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FN9S : Optimization for: Optimization for: Optimization for: plan #iXoZ; plan #wntu; plan #Odx9

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.032 146.893 ↑ 1.0 22 1

Nested Loop Left Join (cost=70.36..598.00 rows=22 width=151) (actual time=0.417..146.893 rows=22 loops=1)

2. 0.014 146.729 ↑ 1.0 22 1

Nested Loop (cost=69.93..242.72 rows=22 width=132) (actual time=0.404..146.729 rows=22 loops=1)

3. 20.816 146.627 ↑ 1.0 22 1

Merge Join (cost=69.51..69.82 rows=22 width=113) (actual time=0.393..146.627 rows=22 loops=1)

  • Merge Cond: (empresaacervo.codigo = base.codigo_empresa_acervo)
4. 125.426 125.426 ↑ 2.8 213,346 1

Index Scan using estrutura_entidade_pkey on estrutura_entidade empresaacervo (cost=0.42..57,747.64 rows=605,013 width=27) (actual time=0.010..125.426 rows=213,346 loops=1)

5. 0.023 0.385 ↑ 1.0 22 1

Sort (cost=68.97..69.03 rows=22 width=90) (actual time=0.377..0.385 rows=22 loops=1)

  • Sort Key: base.codigo_empresa_acervo
  • Sort Method: quicksort Memory: 28kB
6. 0.085 0.362 ↑ 1.0 22 1

Hash Join (cost=1.50..68.48 rows=22 width=90) (actual time=0.128..0.362 rows=22 loops=1)

  • Hash Cond: (base.codigo = edicao.codigo)
7. 0.260 0.260 ↑ 1.0 492 1

Seq Scan on manuais_manual base (cost=0.00..64.92 rows=492 width=82) (actual time=0.029..0.260 rows=492 loops=1)

8. 0.008 0.017 ↑ 1.0 22 1

Hash (cost=1.22..1.22 rows=22 width=12) (actual time=0.017..0.017 rows=22 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
9. 0.009 0.009 ↑ 1.0 22 1

Seq Scan on manuais_manual_edicao edicao (cost=0.00..1.22 rows=22 width=12) (actual time=0.003..0.009 rows=22 loops=1)

10. 0.088 0.088 ↑ 1.0 1 22

Index Scan using estrutura_entidade_pkey on estrutura_entidade criador (cost=0.42..7.85 rows=1 width=27) (actual time=0.004..0.004 rows=1 loops=22)

  • Index Cond: (codigo = base.codigo_usuario_criador)
11. 0.066 0.066 ↑ 1.0 1 22

Index Scan using estrutura_entidade_pkey on estrutura_entidade aprovador (cost=0.42..7.85 rows=1 width=27) (actual time=0.002..0.003 rows=1 loops=22)

  • Index Cond: (base.codigo_usuario_aprovador = codigo)
12.          

SubPlan (forNested Loop Left Join)

13. 0.066 0.066 ↑ 1.0 1 22

Index Scan using manuais_manual_pk on manuais_manual publicado (cost=0.27..8.29 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=22)

  • Index Cond: (codigo = edicao.codigo_ultima_publicacao)
Planning time : 0.856 ms
Execution time : 146.985 ms