explain.depesz.com

PostgreSQL's explain analyze made readable

Result: N2Z

Settings
# exclusive inclusive rows x rows loops node
1. 1.280 19.593 ↑ 1.7 1,360 1

HashAggregate (cost=2,018.65..2,041.57 rows=2,292 width=186) (actual time=19.316..19.593 rows=1,360 loops=1)

2. 0.447 18.313 ↑ 1.7 1,360 1

Subquery Scan on vw_produtos_lncc (cost=1,892.59..1,921.24 rows=2,292 width=186) (actual time=17.425..18.313 rows=1,360 loops=1)

3. 12.510 17.866 ↑ 1.7 1,360 1

Sort (cost=1,892.59..1,898.32 rows=2,292 width=803) (actual time=17.423..17.866 rows=1,360 loops=1)

  • Sort Key: produtos_lncc.idt_tipo_orientacao, produtos_lncc.num_ano_relatorio, produtos_lncc.sts_artigo, tipos_producao.num_ordem, tipos_producao_cientifica.num_ordem, produtos_lncc.des_titulo
  • Sort Method: external sort Disk: 1080kB
4. 0.697 5.356 ↑ 1.7 1,360 1

Nested Loop (cost=1.20..949.17 rows=2,292 width=803) (actual time=0.063..5.356 rows=1,360 loops=1)

5. 0.353 4.659 ↓ 1.2 1,360 1

Hash Left Join (cost=1.20..894.86 rows=1,146 width=742) (actual time=0.026..4.659 rows=1,360 loops=1)

  • Hash Cond: (produtos_lncc.idt_tipo_orientacao = tipos_orientacao.idt_orientacao)
6. 4.300 4.300 ↓ 1.2 1,360 1

Seq Scan on produtos_lncc (cost=0.00..888.61 rows=1,146 width=712) (actual time=0.008..4.300 rows=1,360 loops=1)

  • Filter: ((NOT sts_deletado) AND sts_aprovado_bib AND (NOT sts_deletado) AND (idt_tipo_prod_cientifica = 1) AND (idt_tipo_producao = 1))
  • Rows Removed by Filter: 10622
7. 0.002 0.006 ↑ 1.0 9 1

Hash (cost=1.09..1.09 rows=9 width=34) (actual time=0.006..0.006 rows=9 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
8. 0.004 0.004 ↑ 1.0 9 1

Seq Scan on tipos_orientacao (cost=0.00..1.09 rows=9 width=34) (actual time=0.002..0.004 rows=9 loops=1)

9. 0.000 0.000 ↑ 2.0 1 1,360

Materialize (cost=0.00..2.75 rows=2 width=73) (actual time=0.000..0.000 rows=1 loops=1,360)

10. 0.001 0.015 ↑ 2.0 1 1

Nested Loop (cost=0.00..2.74 rows=2 width=73) (actual time=0.012..0.015 rows=1 loops=1)

11. 0.007 0.007 ↑ 1.0 1 1

Seq Scan on tipos_producao (cost=0.00..1.14 rows=1 width=31) (actual time=0.006..0.007 rows=1 loops=1)

  • Filter: (idt_tipo_producao = 1)
  • Rows Removed by Filter: 10
12. 0.007 0.007 ↑ 2.0 1 1

Seq Scan on tipos_producao_cientifica (cost=0.00..1.58 rows=2 width=42) (actual time=0.005..0.007 rows=1 loops=1)

  • Filter: ((idt_tipo_prod_cientifica = 1) AND (idt_tipo_producao = 1))
  • Rows Removed by Filter: 38