explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YvCx

Settings
# exclusive inclusive rows x rows loops node
1. 4.659 19.849 ↓ 1.0 10,005 1

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

  • Sort Key: (COALESCE(produto.descricao_resumida, produto.descricao))
  • Sort Method: quicksort Memory: 2990kB
2. 1.296 15.190 ↓ 1.0 10,005 1

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

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

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

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

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

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

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

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

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

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

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

  • Buckets: 16384 Batches: 1 Memory Usage: 597kB
8. 0.868 0.868 ↑ 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.868 rows=10,001 loops=1)

9. 1.104 1.999 ↓ 1.0 10,001 1

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

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

Seq Scan on prod_grupo (cost=0.00..192.94 rows=9,994 width=8) (actual time=0.002..0.895 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.653 ms
Execution time : 21.657 ms