explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JctN

Settings
# exclusive inclusive rows x rows loops node
1. 4.401 18.950 ↓ 1.0 10,005 1

Sort (cost=2,199.21..2,223.99 rows=9,910 width=144) (actual time=18.144..18.950 rows=10,005 loops=1)

  • Sort Key: produto.descricao_resumida
  • Sort Method: quicksort Memory: 2883kB
2. 1.072 14.549 ↓ 1.0 10,005 1

Hash Left Join (cost=676.61..1,541.45 rows=9,910 width=144) (actual time=3.671..14.549 rows=10,005 loops=1)

  • Hash Cond: (produto.id_produto = produto_foto.id_produto)
3. 1.800 13.477 ↓ 1.0 10,005 1

Hash Join (cost=649.73..1,469.97 rows=9,910 width=112) (actual time=3.665..13.477 rows=10,005 loops=1)

  • Hash Cond: (produto.id_prod_unidade = prod_unidade.id_prod_unidade)
4. 2.061 11.673 ↓ 1.0 10,005 1

Hash Join (cost=648.69..1,332.67 rows=9,910 width=95) (actual time=3.652..11.673 rows=10,005 loops=1)

  • Hash Cond: (prod_subgrupo.id_prod_grupo = prod_grupo.id_prod_grupo)
5. 2.138 7.881 ↓ 1.0 10,005 1

Hash Join (cost=330.82..878.22 rows=9,996 width=95) (actual time=1.876..7.881 rows=10,005 loops=1)

  • Hash Cond: (produto.id_prod_subgrupo = prod_subgrupo.id_prod_subgrupo)
6. 3.922 3.922 ↓ 1.0 10,005 1

Seq Scan on produto (cost=0.00..409.95 rows=9,996 width=87) (actual time=0.006..3.922 rows=10,005 loops=1)

  • Filter: (vendido_atendimento AND ((tipo_produto_composicao)::integer <> 3))
7. 0.982 1.821 ↑ 1.0 10,001 1

Hash (cost=204.81..204.81 rows=10,081 width=16) (actual time=1.821..1.821 rows=10,001 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 597kB
8. 0.839 0.839 ↑ 1.0 10,001 1

Seq Scan on prod_subgrupo (cost=0.00..204.81 rows=10,081 width=16) (actual time=0.002..0.839 rows=10,001 loops=1)

9. 0.944 1.731 ↓ 1.0 10,001 1

Hash (cost=192.94..192.94 rows=9,994 width=8) (actual time=1.731..1.731 rows=10,001 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 519kB
10. 0.787 0.787 ↓ 1.0 10,001 1

Seq Scan on prod_grupo (cost=0.00..192.94 rows=9,994 width=8) (actual time=0.003..0.787 rows=10,001 loops=1)

11. 0.002 0.004 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=25) (actual time=0.004..0.004 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
12. 0.002 0.002 ↑ 1.0 2 1

Seq Scan on prod_unidade (cost=0.00..1.02 rows=2 width=25) (actual time=0.001..0.002 rows=2 loops=1)

13. 0.000 0.000 ↓ 0.0 0 1

Hash (cost=17.50..17.50 rows=750 width=40) (actual time=0.000..0.000 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
14. 0.000 0.000 ↓ 0.0 0 1

Seq Scan on produto_foto (cost=0.00..17.50 rows=750 width=40) (actual time=0.000..0.000 rows=0 loops=1)

Planning time : 0.647 ms
Execution time : 19.727 ms