explain.depesz.com

PostgreSQL's explain analyze made readable

Result: B8H1d

Settings
# exclusive inclusive rows x rows loops node
1. 6.584 2,303.714 ↑ 337.3 1,175 1

Merge Left Join (cost=80,291.27..111,046.74 rows=396,335 width=1,291) (actual time=2,295.113..2,303.714 rows=1,175 loops=1)

  • Output: s.data, nc.descricao, ((((CASE WHEN (ge.id IS NULL) THEN ''::character varying ELSE ge.descricao END)::text || CASE WHEN (me.id IS NULL) THEN ''::text ELSE ((' ('::text || (me.descricao)::text) || ')'::text) END) || CASE WHEN ((ge.id IS NOT NULL) (...)
  • '::text) || ' - '::text) || btrim(to_char((acon.quantidade_maxima)::real, '99999990D00'::text), ' '::text)) || ' '::text) || upper((medida.simbolo)::text)) END ELSE upper((medida.simbolo)::text) END), s.id, nc.id, um.id, mun.nome, CASE WHEN (...)
  • Merge Cond: (s.id = maxp.serie_fk)
  • Buffers: shared hit=210,025, temp written=78
2.          

CTE consulta_tipificacao

3. 63.666 988.194 ↑ 1.0 12,811 1

Hash Left Join (cost=916.95..4,419.33 rows=12,811 width=40) (actual time=57.498..988.194 rows=12,811 loops=1)

  • Output: abstractcl6_.id, replace((((((((((((((((((((((((((((((((COALESCE((','::text || (concentrac17_.descricao)::text), ''::text) || COALESCE((', '::text || (ingredient18_.descricao)::text), ''::text)) || COALESCE((', '::text || (tracaoimpl20_.d (...)
  • Inner Unique: true
  • Hash Cond: (classifica26_.forma_apresentacao_fk = formaapres42_.id)
  • Buffers: shared hit=357
4. 24.879 924.522 ↑ 1.0 12,811 1

Hash Left Join (cost=903.80..2,354.82 rows=12,811 width=9,459) (actual time=57.445..924.522 rows=12,811 loops=1)

  • Output: abstractcl6_.id, origemprod13_.descricao, modeloimpl22_.descricao, grupoquimi19_.descricao, concentrac17_.descricao, tracaoimpl20_.descricao, tipificaca16_.descricao, potenciaim15_.descricao, classeimpl12_.descricao, ingredient18_.d (...)
  • Inner Unique: true
  • Hash Cond: (classifica26_.residuo_fiacao_fk = residuofia43_.id)
  • Buffers: shared hit=357
5. 24.988 899.633 ↑ 1.0 12,811 1

Hash Left Join (cost=890.65..2,308.04 rows=12,811 width=8,951) (actual time=57.406..899.633 rows=12,811 loops=1)

  • Output: abstractcl6_.id, origemprod13_.descricao, modeloimpl22_.descricao, grupoquimi19_.descricao, concentrac17_.descricao, tracaoimpl20_.descricao, tipificaca16_.descricao, potenciaim15_.descricao, classeimpl12_.descricao, ingredien (...)
  • Inner Unique: true
  • Hash Cond: (classifica26_.gramatura_fk = gramaturai41_.id)
  • Buffers: shared hit=357
6. 25.389 874.582 ↑ 1.0 12,811 1

Hash Left Join (cost=889.02..2,272.70 rows=12,811 width=8,443) (actual time=57.314..874.582 rows=12,811 loops=1)

  • Output: abstractcl6_.id, origemprod13_.descricao, modeloimpl22_.descricao, grupoquimi19_.descricao, concentrac17_.descricao, tracaoimpl20_.descricao, tipificaca16_.descricao, potenciaim15_.descricao, classeimpl12_.descricao, ing (...)
  • Inner Unique: true
  • Hash Cond: (classifica26_.sub_grupo_fk = subgrupoim28_.id)
  • Buffers: shared hit=356
7. 24.993 849.088 ↑ 1.0 12,811 1

Hash Left Join (cost=886.94..2,235.99 rows=12,811 width=7,935) (actual time=57.181..849.088 rows=12,811 loops=1)

  • Output: abstractcl6_.id, origemprod13_.descricao, modeloimpl22_.descricao, grupoquimi19_.descricao, concentrac17_.descricao, tracaoimpl20_.descricao, tipificaca16_.descricao, potenciaim15_.descricao, classeimpl12_.descrica (...)
  • Inner Unique: true
  • Hash Cond: (classifica26_.residuo_beneficiamento_fk = residuoben35_.id)
  • Buffers: shared hit=355
8. 25.916 824.088 ↑ 1.0 12,811 1

Hash Left Join (cost=873.79..2,189.21 rows=12,811 width=7,427) (actual time=57.126..824.088 rows=12,811 loops=1)

  • Output: abstractcl6_.id, origemprod13_.descricao, modeloimpl22_.descricao, grupoquimi19_.descricao, concentrac17_.descricao, tracaoimpl20_.descricao, tipificaca16_.descricao, potenciaim15_.descricao, classeimpl12_.de (...)
  • Inner Unique: true
  • Hash Cond: (classifica26_.grau_folha_fk = graufolhai33_.id)
  • Buffers: shared hit=355
9. 26.468 798.143 ↑ 1.0 12,811 1

Hash Left Join (cost=872.63..2,145.72 rows=12,811 width=6,919) (actual time=57.062..798.143 rows=12,811 loops=1)

  • Output: abstractcl6_.id, origemprod13_.descricao, modeloimpl22_.descricao, grupoquimi19_.descricao, concentrac17_.descricao, tracaoimpl20_.descricao, tipificaca16_.descricao, potenciaim15_.descricao, classeimpl (...)
  • Inner Unique: true
  • Hash Cond: (classifica26_.tipo_fk = tipoimpl31_.id)
  • Buffers: shared hit=354
10. 24.937 771.476 ↑ 1.0 12,811 1

Hash Left Join (cost=869.38..2,107.42 rows=12,811 width=6,917) (actual time=56.833..771.476 rows=12,811 loops=1)

  • Output: abstractcl6_.id, origemprod13_.descricao, modeloimpl22_.descricao, grupoquimi19_.descricao, concentrac17_.descricao, tracaoimpl20_.descricao, tipificaca16_.descricao, potenciaim15_.descricao, clas (...)
  • Inner Unique: true
  • Hash Cond: (classifica26_.sub_classe_fk = subclassei29_.id)
  • Buffers: shared hit=353
11. 24.899 746.492 ↑ 1.0 12,811 1

Hash Left Join (cost=868.00..2,071.28 rows=12,811 width=6,409) (actual time=56.749..746.492 rows=12,811 loops=1)

  • Output: abstractcl6_.id, origemprod13_.descricao, modeloimpl22_.descricao, grupoquimi19_.descricao, concentrac17_.descricao, tracaoimpl20_.descricao, tipificaca16_.descricao, potenciaim15_.descricao (...)
  • Inner Unique: true
  • Hash Cond: (classifica26_.comprimento_fibra_fk = compriment34_.id)
  • Buffers: shared hit=352
12. 25.152 721.575 ↑ 1.0 12,811 1

Hash Left Join (cost=866.94..2,016.25 rows=12,811 width=5,901) (actual time=56.703..721.575 rows=12,811 loops=1)

  • Output: abstractcl6_.id, origemprod13_.descricao, modeloimpl22_.descricao, grupoquimi19_.descricao, concentrac17_.descricao, tracaoimpl20_.descricao, tipificaca16_.descricao, potenciaim15_.des (...)
  • Inner Unique: true
  • Hash Cond: (classifica26_.grupo_fk = grupoimpl32_.id)
  • Buffers: shared hit=351
13. 24.816 696.290 ↑ 1.0 12,811 1

Hash Left Join (cost=864.47..1,979.08 rows=12,811 width=5,898) (actual time=56.543..696.290 rows=12,811 loops=1)

  • Output: abstractcl6_.id, origemprod13_.descricao, modeloimpl22_.descricao, grupoquimi19_.descricao, concentrac17_.descricao, tracaoimpl20_.descricao, tipificaca16_.descricao, potenciaim1 (...)
  • Inner Unique: true
  • Hash Cond: (classifica26_.resistencia_fk = resistenci39_.id)
  • Buffers: shared hit=350
14. 24.814 671.452 ↑ 1.0 12,811 1

Hash Left Join (cost=863.41..1,924.04 rows=12,811 width=5,390) (actual time=56.487..671.452 rows=12,811 loops=1)

  • Output: abstractcl6_.id, origemprod13_.descricao, modeloimpl22_.descricao, grupoquimi19_.descricao, concentrac17_.descricao, tracaoimpl20_.descricao, tipificaca16_.descricao, poten (...)
  • Inner Unique: true
  • Hash Cond: (classifica26_.micronaire_fk = micronaire38_.id)
  • Buffers: shared hit=349
15. 25.497 646.620 ↑ 1.0 12,811 1

Hash Left Join (cost=862.34..1,869.01 rows=12,811 width=4,882) (actual time=56.441..646.620 rows=12,811 loops=1)

  • Output: abstractcl6_.id, origemprod13_.descricao, modeloimpl22_.descricao, grupoquimi19_.descricao, concentrac17_.descricao, tracaoimpl20_.descricao, tipificaca16_.descricao, (...)
  • Inner Unique: true
  • Hash Cond: (classifica26_.classe_fk = classeimpl30_.id)
  • Buffers: shared hit=348
16. 25.540 620.103 ↑ 1.0 12,811 1

Hash Left Join (cost=846.03..1,818.94 rows=12,811 width=4,876) (actual time=55.391..620.103 rows=12,811 loops=1)

  • Output: abstractcl6_.id, origemprod13_.descricao, modeloimpl22_.descricao, grupoquimi19_.descricao, concentrac17_.descricao, tracaoimpl20_.descricao, tipificaca16_.desc (...)
  • Inner Unique: true
  • Hash Cond: (classifica26_.categoria_fk = categoriai27_.id)
  • Buffers: shared hit=344
17. 25.273 594.535 ↑ 1.0 12,811 1

Hash Left Join (cost=844.85..1,784.09 rows=12,811 width=4,368) (actual time=55.326..594.535 rows=12,811 loops=1)

  • Output: abstractcl6_.id, origemprod13_.descricao, modeloimpl22_.descricao, grupoquimi19_.descricao, concentrac17_.descricao, tracaoimpl20_.descricao, tipificaca16 (...)
  • Inner Unique: true
  • Hash Cond: (classifica26_.cor_fk = corimpl37_.id)
  • Buffers: shared hit=343
18. 25.596 569.223 ↑ 1.0 12,811 1

Hash Left Join (cost=843.51..1,744.93 rows=12,811 width=3,860) (actual time=55.256..569.223 rows=12,811 loops=1)

  • Output: abstractcl6_.id, origemprod13_.descricao, modeloimpl22_.descricao, grupoquimi19_.descricao, concentrac17_.descricao, tracaoimpl20_.descricao, tipifi (...)
  • Inner Unique: true
  • Hash Cond: (classifica26_.grao_inteiro_fk = graosintei40_.id)
  • Buffers: shared hit=342
19. 25.068 543.561 ↑ 1.0 12,811 1

Hash Left Join (cost=842.06..1,709.69 rows=12,811 width=3,352) (actual time=55.158..543.561 rows=12,811 loops=1)

  • Output: abstractcl6_.id, origemprod13_.descricao, modeloimpl22_.descricao, grupoquimi19_.descricao, concentrac17_.descricao, tracaoimpl20_.descricao, (...)
  • Inner Unique: true
  • Hash Cond: (classifica26_.sub_categoria_fk = subcategor36_.id)
  • Buffers: shared hit=341
20. 27.506 518.454 ↑ 1.0 12,811 1

Hash Left Join (cost=840.93..1,674.87 rows=12,811 width=2,844) (actual time=55.080..518.454 rows=12,811 loops=1)

  • Output: abstractcl6_.id, origemprod13_.descricao, modeloimpl22_.descricao, grupoquimi19_.descricao, concentrac17_.descricao, tracaoimpl20_.descr (...)
  • Inner Unique: true
  • Hash Cond: (abstractcl6_2.classificacao_caracteristica_pauta_pgpm_fk = classifica26_.id)
  • Buffers: shared hit=340
21. 23.977 481.811 ↑ 1.0 12,811 1

Hash Left Join (cost=705.26..1,505.54 rows=12,811 width=2,716) (actual time=45.870..481.811 rows=12,811 loops=1)

  • Output: abstractcl6_.id, origemprod13_.descricao, modeloimpl22_.descricao, grupoquimi19_.descricao, concentrac17_.descricao, tracaoimpl20_ (...)
  • Inner Unique: true
  • Hash Cond: (classifica11_.estado_fisico_fk = estadofisi24_.id)
  • Buffers: shared hit=298
22. 26.282 457.694 ↑ 1.0 12,811 1

Hash Left Join (cost=702.82..1,469.36 rows=12,811 width=2,713) (actual time=45.699..457.694 rows=12,811 loops=1)

  • Output: abstractcl6_.id, classifica11_.estado_fisico_fk, origemprod13_.descricao, modeloimpl22_.descricao, grupoquimi19_.descricao, (...)
  • Inner Unique: true
  • Hash Cond: (abstractcl6_.id = abstractcl6_2.id)
  • Buffers: shared hit=297
23. 23.895 423.117 ↑ 1.0 12,811 1

Hash Left Join (cost=564.71..1,297.61 rows=12,811 width=2,705) (actual time=37.326..423.117 rows=12,811 loops=1)

  • Output: abstractcl6_.id, classifica11_.estado_fisico_fk, origemprod13_.descricao, modeloimpl22_.descricao, grupoquimi19_.descr (...)
  • Inner Unique: true
  • Hash Cond: (classifica11_.gramatura_fk = gramaturai25_.id)
  • Buffers: shared hit=256
24. 23.618 399.144 ↑ 1.0 12,811 1

Hash Left Join (cost=563.08..1,262.34 rows=12,811 width=2,197) (actual time=37.217..399.144 rows=12,811 loops=1)

  • Output: abstractcl6_.id, classifica11_.gramatura_fk, classifica11_.estado_fisico_fk, origemprod13_.descricao, modeloimpl (...)
  • Inner Unique: true
  • Hash Cond: (classifica11_.cor_fk = corimpl23_.id)
  • Buffers: shared hit=255
25. 24.724 375.482 ↑ 1.0 12,811 1

Hash Left Join (cost=561.74..1,227.31 rows=12,811 width=1,689) (actual time=37.137..375.482 rows=12,811 loops=1)

  • Output: abstractcl6_.id, classifica11_.cor_fk, classifica11_.gramatura_fk, classifica11_.estado_fisico_fk, origemp (...)
  • Inner Unique: true
  • Hash Cond: (classifica11_.marca_fk = marcaimpl21_.id)
  • Buffers: shared hit=254
26. 348.151 350.159 ↑ 1.0 12,811 1

Hash Left Join (cost=551.70..1,183.51 rows=12,811 width=1,680) (actual time=36.498..350.159 rows=12,811 loops=1)

  • Output: abstractcl6_.id, classifica11_.marca_fk, classifica11_.cor_fk, classifica11_.gramatura_fk, classific (...)
  • Inner Unique: true
  • Hash Cond: (classifica11_.cultivo_fk = cultivoimp14_.id)
  • Buffers: shared hit=251
  • -> Hash Left Join (cost=549.62..1147.74 rows=12,811 width=1,172) (actual time=36.364..325.722 rows=12,811 loo (...)
  • Output: abstractcl6_.id, classifica11_.cultivo_fk, classifica11_.marca_fk, classifica11_.cor_fk, class (...)
  • Inner Unique: true
  • Hash Cond: (classifica11_.ingrediente_ativo_fk = ingredient18_.id)
  • Buffers: shared hit=250
  • -> Hash Left Join (cost=539.91..1104.35 rows=12,811 width=1,162) (actual time=35.755..300.905 rows=128 (...)
  • Output: abstractcl6_.id, classifica11_.ingrediente_ativo_fk, classifica11_.cultivo_fk, classific (...)
  • Inner Unique: true
  • Hash Cond: (classifica11_.classe_fk = classeimpl12_.id)
  • Buffers: shared hit=247
  • -> Hash Left Join (cost=523.61..1054.36 rows=12,811 width=1,156) (actual time=34.664..275.591 ro (...)
  • Output: abstractcl6_.id, classifica11_.classe_fk, classifica11_.ingrediente_ativo_fk, clas (...)
  • Inner Unique: true
  • Hash Cond: (classifica11_.potencia_fk = potenciaim15_.id)
  • Buffers: shared hit=243
  • -> Hash Left Join (cost=519.68..1016.67 rows=12,811 width=1,160) (actual time=34.358..251. (...)
  • Output: abstractcl6_.id, classifica11_.potencia_fk, classifica11_.classe_fk, classif (...)
  • Inner Unique: true
  • Hash Cond: (classifica11_.tipificacao_fk = tipificaca16_.id)
  • Buffers: shared hit=242
  • -> Hash Left Join (cost=449.78..913.10 rows=12,811 width=1,153) (actual time=29.768. (...)
  • Output: abstractcl6_.id, classifica11_.tipificacao_fk, classifica11_.potencia_ (...)
  • Inner Unique: true
  • Hash Cond: (classifica11_.tracao_fk = tracaoimpl20_.id)
  • Buffers: shared hit=225
  • -> Hash Left Join (cost=448.63..877.39 rows=12,811 width=645) (actual time=29 (...)
  • Output: abstractcl6_.id, classifica11_.tracao_fk, classifica11_.tipifica (...)
  • Inner Unique: true
  • Hash Cond: (classifica11_.concentracao_fk = concentrac17_.id)
  • Buffers: shared hit=224
  • -> Hash Left Join (cost=441.95..837.00 rows=12,811 width=643) (actual t (...)
  • Output: abstractcl6_.id, classifica11_.concentracao_fk, classifica (...)
  • Inner Unique: true
  • Hash Cond: (classifica11_.grupo_quimico_fk = grupoquimi19_.id)
  • Buffers: shared hit=222
  • -> Hash Left Join (cost=436.55..797.89 rows=12,811 width=629) (ac (...)
  • Output: abstractcl6_.id, classifica11_.grupo_quimico_fk, cla (...)
  • Inner Unique: true
  • Hash Cond: (classifica11_.modelo_fk = modeloimpl22_.id)
  • Buffers: shared hit=220
  • -> Hash Left Join (cost=420.94..748.60 rows=12,811 width=62 (...)
  • Output: abstractcl6_.id, classifica11_.modelo_fk, clas (...)
  • Inner Unique: true
  • Hash Cond: (classifica11_.origem_producao_fk = origemp (...)
  • Buffers: shared hit=216
  • -> Hash Left Join (cost=419.33..712.74 rows=12,811 wi (...)
  • Output: abstractcl6_.id, classifica11_.origem_pr (...)
  • Inner Unique: true
  • Hash Cond: (abstractcl6_1.classificacao_caracter (...)
  • Buffers: shared hit=215
  • -> Hash Left Join (cost=271.09..530.84 rows=12 (...)
  • Output: abstractcl6_.id, abstractcl6_1.cla (...)
  • Inner Unique: true
  • Hash Cond: (abstractcl6_.id = abstractcl6_ (...)
  • Buffers: shared hit=178
  • -> Seq Scan on public.tb_abstract_classif (...)
  • Output: abstractcl6_.id, abstractcl6 (...)
  • Buffers: shared hit=98
  • -> Hash (cost=164.93..164.93 rows=8,493 w (...)
  • Output: abstractcl6_1.id, abstractcl (...)
  • Buckets: 16,384 Batches: 1 Memory U (...)
  • Buffers: shared hit=80
  • -> Seq Scan on public.tb_classifica (...)
  • Output: abstractcl6_1.id, abst (...)
  • Buffers: shared hit=80
  • -> Hash (cost=86.44..86.44 rows=4,944 width=120 (...)
  • Output: classifica11_.id, classifica11_.or (...)
  • Buckets: 8,192 Batches: 1 Memory Usage: 3 (...)
  • Buffers: shared hit=37
  • -> Seq Scan on public.tb_classificacao_ca (...)
  • Output: classifica11_.id, classifica (...)
  • Buffers: shared hit=37
  • -> Hash (cost=1.27..1.27 rows=27 width=524) (actual (...)
  • Output: origemprod13_.descricao, origemprod13_.i (...)
  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared hit=1
  • -> Seq Scan on public.tb_origem_producao origem (...)
  • Output: origemprod13_.descricao, origempro (...)
  • Buffers: shared hit=1
  • -> Hash (cost=9.16..9.16 rows=516 width=17) (actual time=0 (...)
  • Output: modeloimpl22_.descricao, modeloimpl22_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 35kB
  • Buffers: shared hit=4
  • -> Seq Scan on public.tb_modelo modeloimpl22_ (cost= (...)
  • Output: modeloimpl22_.descricao, modeloimpl22_.i (...)
  • Buffers: shared hit=4
  • -> Hash (cost=3.51..3.51 rows=151 width=30) (actual time=0.304.. (...)
  • Output: grupoquimi19_.descricao, grupoquimi19_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 18kB
  • Buffers: shared hit=2
  • -> Seq Scan on public.tb_grupo_quimico grupoquimi19_ (cost (...)
  • Output: grupoquimi19_.descricao, grupoquimi19_.id
  • Buffers: shared hit=2
  • -> Hash (cost=4.08..4.08 rows=208 width=18) (actual time=0.413..0.414 (...)
  • Output: concentrac17_.descricao, concentrac17_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 19kB
  • Buffers: shared hit=2
  • -> Seq Scan on public.tb_concentracao concentrac17_ (cost=0.00.. (...)
  • Output: concentrac17_.descricao, concentrac17_.id
  • Buffers: shared hit=2
  • -> Hash (cost=1.07..1.07 rows=7 width=524) (actual time=0.027..0.028 rows=7 (...)
  • Output: tracaoimpl20_.descricao, tracaoimpl20_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
  • -> Seq Scan on public.tb_tracao tracaoimpl20_ (cost=0.00..1.07 rows=7 (...)
  • Output: tracaoimpl20_.descricao, tracaoimpl20_.id
  • Buffers: shared hit=1
  • -> Hash (cost=40.51..40.51 rows=2,351 width=23) (actual time=4.540..4.541 rows=2,351 (...)
  • Output: tipificaca16_.descricao, tipificaca16_.id
  • Buckets: 4,096 Batches: 1 Memory Usage: 168kB
  • Buffers: shared hit=17
  • -> Seq Scan on public.tb_tipificacao tipificaca16_ (cost=0.00..40.51 rows=23 (...)
  • Output: tipificaca16_.descricao, tipificaca16_.id
  • Buffers: shared hit=17
27. 0.261 0.261 ↑ 1.0 130 1

Hash (cost=2.30..2.30 rows=130 width=12) (actual time=0.260..0.261 rows=130 loops=1)

  • Output: potenciaim15_.descricao, potenciaim15_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 15kB
  • Buffers: shared hit=1
  • -> Seq Scan on public.tb_potencia potenciaim15_ (cost=0.00..2.30 rows=130 width=12 (...)
  • Output: potenciaim15_.descricao, potenciaim15_.id
  • Buffers: shared hit=1
28. 1.064 1.064 ↑ 1.0 547 1

Hash (cost=9.47..9.47 rows=547 width=22) (actual time=1.063..1.064 rows=547 loops=1)

  • Output: classeimpl12_.descricao, classeimpl12_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 40kB
  • Buffers: shared hit=4
  • -> Seq Scan on public.tb_classe classeimpl12_ (cost=0.00..9.47 rows=547 width=22) (actua (...)
  • Output: classeimpl12_.descricao, classeimpl12_.id
  • Buffers: shared hit=4
29. 0.580 0.580 ↑ 1.0 298 1

Hash (cost=5.98..5.98 rows=298 width=26) (actual time=0.579..0.580 rows=298 loops=1)

  • Output: ingredient18_.descricao, ingredient18_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 27kB
  • Buffers: shared hit=3
  • -> Seq Scan on public.tb_ingrediente_ativo ingredient18_ (cost=0.00..5.98 rows=298 width=26) ( (...)
  • Output: ingredient18_.descricao, ingredient18_.id
  • Buffers: shared hit=3
30. 0.103 0.103 ↑ 1.0 48 1

Hash (cost=1.48..1.48 rows=48 width=524) (actual time=0.102..0.103 rows=48 loops=1)

  • Output: cultivoimp14_.descricao, cultivoimp14_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=1
  • -> Seq Scan on public.tb_cultivo cultivoimp14_ (cost=0.00..1.48 rows=48 width=524) (actual time=0.00 (...)
  • Output: cultivoimp14_.descricao, cultivoimp14_.id
  • Buffers: shared hit=1
31. 0.599 0.599 ↑ 1.0 313 1

Hash (cost=6.13..6.13 rows=313 width=25) (actual time=0.598..0.599 rows=313 loops=1)

  • Output: marcaimpl21_.descricao, marcaimpl21_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 27kB
  • Buffers: shared hit=3
  • -> Seq Scan on public.tb_marca marcaimpl21_ (cost=0.00..6.13 rows=313 width=25) (actual time=0.010..0.287 (...)
  • Output: marcaimpl21_.descricao, marcaimpl21_.id
  • Buffers: shared hit=3
32. 0.044 0.044 ↑ 1.0 15 1

Hash (cost=1.15..1.15 rows=15 width=524) (actual time=0.043..0.044 rows=15 loops=1)

  • Output: corimpl23_.descricao, corimpl23_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
  • -> Seq Scan on public.tb_cor corimpl23_ (cost=0.00..1.15 rows=15 width=524) (actual time=0.006..0.020 rows=15 lo (...)
  • Output: corimpl23_.descricao, corimpl23_.id
  • Buffers: shared hit=1
33. 0.078 0.078 ↑ 1.0 28 1

Hash (cost=1.28..1.28 rows=28 width=524) (actual time=0.077..0.078 rows=28 loops=1)

  • Output: gramaturai25_.descricao, gramaturai25_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared hit=1
  • -> Seq Scan on public.tb_gramatura gramaturai25_ (cost=0.00..1.28 rows=28 width=524) (actual time=0.021..0.046 rows=28 (...)
  • Output: gramaturai25_.descricao, gramaturai25_.id
  • Buffers: shared hit=1
34. 8.295 8.295 ↑ 1.0 4,316 1

Hash (cost=84.16..84.16 rows=4,316 width=24) (actual time=8.294..8.295 rows=4,316 loops=1)

  • Output: abstractcl6_2.id, abstractcl6_2.produto_fk, abstractcl6_2.classificacao_caracteristica_pauta_pgpm_fk
  • Buckets: 8,192 Batches: 1 Memory Usage: 301kB
  • Buffers: shared hit=41
  • -> Seq Scan on public.tb_classificacao_pauta_pgpm abstractcl6_2 (cost=0.00..84.16 rows=4,316 width=24) (actual time=0.008..4. (...)
  • Output: abstractcl6_2.id, abstractcl6_2.produto_fk, abstractcl6_2.classificacao_caracteristica_pauta_pgpm_fk
  • Buffers: shared hit=41
35. 0.075 0.140 ↑ 1.0 64 1

Hash (cost=1.64..1.64 rows=64 width=19) (actual time=0.139..0.140 rows=64 loops=1)

  • Output: estadofisi24_.descricao, estadofisi24_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
  • Buffers: shared hit=1
36. 0.065 0.065 ↑ 1.0 64 1

Seq Scan on public.tb_estado_fisico estadofisi24_ (cost=0.00..1.64 rows=64 width=19) (actual time=0.009..0.065 rows=64 loops=1)

  • Output: estadofisi24_.descricao, estadofisi24_.id
  • Buffers: shared hit=1
37. 9.137 9.137 ↑ 1.0 4,163 1

Hash (cost=83.63..83.63 rows=4,163 width=144) (actual time=9.136..9.137 rows=4,163 loops=1)

  • Output: classifica26_.id, classifica26_.sub_categoria_fk, classifica26_.grao_inteiro_fk, classifica26_.cor_fk, classifica26_.categoria_fk, (...)
  • Buckets: 8,192 Batches: 1 Memory Usage: 411kB
  • Buffers: shared hit=42
  • -> Seq Scan on public.tb_classificacao_caracteristica_pauta_pgpm classifica26_ (cost=0.00..83.63 rows=4,163 width=144) (actual time=0.009 (...)
  • Output: classifica26_.id, classifica26_.sub_categoria_fk, classifica26_.grao_inteiro_fk, classifica26_.cor_fk, classifica26_.categor (...)
  • Buffers: shared hit=42
38. 0.013 0.039 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=524) (actual time=0.038..0.039 rows=6 loops=1)

  • Output: subcategor36_.descricao, subcategor36_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
39. 0.026 0.026 ↑ 1.0 6 1

Seq Scan on public.tb_sub_categoria subcategor36_ (cost=0.00..1.06 rows=6 width=524) (actual time=0.020..0.026 rows=6 loops=1)

  • Output: subcategor36_.descricao, subcategor36_.id
  • Buffers: shared hit=1
40. 0.028 0.066 ↑ 1.0 20 1

Hash (cost=1.20..1.20 rows=20 width=524) (actual time=0.065..0.066 rows=20 loops=1)

  • Output: graosintei40_.descricao, graosintei40_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
41. 0.038 0.038 ↑ 1.0 20 1

Seq Scan on public.tb_grao_inteiro graosintei40_ (cost=0.00..1.20 rows=20 width=524) (actual time=0.020..0.038 rows=20 loops=1)

  • Output: graosintei40_.descricao, graosintei40_.id
  • Buffers: shared hit=1
42. 0.020 0.039 ↑ 1.0 15 1

Hash (cost=1.15..1.15 rows=15 width=524) (actual time=0.039..0.039 rows=15 loops=1)

  • Output: corimpl37_.descricao, corimpl37_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
43. 0.019 0.019 ↑ 1.0 15 1

Seq Scan on public.tb_cor corimpl37_ (cost=0.00..1.15 rows=15 width=524) (actual time=0.005..0.019 rows=15 loops=1)

  • Output: corimpl37_.descricao, corimpl37_.id
  • Buffers: shared hit=1
44. 0.015 0.028 ↑ 1.0 8 1

Hash (cost=1.08..1.08 rows=8 width=524) (actual time=0.027..0.028 rows=8 loops=1)

  • Output: categoriai27_.descricao, categoriai27_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
45. 0.013 0.013 ↑ 1.0 8 1

Seq Scan on public.tb_categoria categoriai27_ (cost=0.00..1.08 rows=8 width=524) (actual time=0.005..0.013 rows=8 loops=1)

  • Output: categoriai27_.descricao, categoriai27_.id
  • Buffers: shared hit=1
46. 0.534 1.020 ↑ 1.0 547 1

Hash (cost=9.47..9.47 rows=547 width=22) (actual time=1.019..1.020 rows=547 loops=1)

  • Output: classeimpl30_.descricao, classeimpl30_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 40kB
  • Buffers: shared hit=4
47. 0.486 0.486 ↑ 1.0 547 1

Seq Scan on public.tb_classe classeimpl30_ (cost=0.00..9.47 rows=547 width=22) (actual time=0.008..0.486 rows=547 loops=1)

  • Output: classeimpl30_.descricao, classeimpl30_.id
  • Buffers: shared hit=4
48. 0.009 0.018 ↑ 1.0 3 1

Hash (cost=1.03..1.03 rows=3 width=524) (actual time=0.017..0.018 rows=3 loops=1)

  • Output: micronaire38_.descricao, micronaire38_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
49. 0.009 0.009 ↑ 1.0 3 1

Seq Scan on public.tb_micronaire micronaire38_ (cost=0.00..1.03 rows=3 width=524) (actual time=0.005..0.009 rows=3 loops=1)

  • Output: micronaire38_.descricao, micronaire38_.id
  • Buffers: shared hit=1
50. 0.013 0.022 ↑ 1.0 3 1

Hash (cost=1.03..1.03 rows=3 width=524) (actual time=0.021..0.022 rows=3 loops=1)

  • Output: resistenci39_.descricao, resistenci39_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
51. 0.009 0.009 ↑ 1.0 3 1

Seq Scan on public.tb_resistencia resistenci39_ (cost=0.00..1.03 rows=3 width=524) (actual time=0.005..0.009 rows=3 loops=1)

  • Output: resistenci39_.descricao, resistenci39_.id
  • Buffers: shared hit=1
52. 0.070 0.133 ↑ 1.0 65 1

Hash (cost=1.65..1.65 rows=65 width=19) (actual time=0.132..0.133 rows=65 loops=1)

  • Output: grupoimpl32_.descricao, grupoimpl32_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
  • Buffers: shared hit=1
53. 0.063 0.063 ↑ 1.0 65 1

Seq Scan on public.tb_grupo grupoimpl32_ (cost=0.00..1.65 rows=65 width=19) (actual time=0.007..0.063 rows=65 loops=1)

  • Output: grupoimpl32_.descricao, grupoimpl32_.id
  • Buffers: shared hit=1
54. 0.009 0.018 ↑ 1.0 3 1

Hash (cost=1.03..1.03 rows=3 width=524) (actual time=0.017..0.018 rows=3 loops=1)

  • Output: compriment34_.descricao, compriment34_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
55. 0.009 0.009 ↑ 1.0 3 1

Seq Scan on public.tb_comprimento_fibra compriment34_ (cost=0.00..1.03 rows=3 width=524) (actual time=0.005..0.009 rows=3 loops=1)

  • Output: compriment34_.descricao, compriment34_.id
  • Buffers: shared hit=1
56. 0.026 0.047 ↑ 1.0 17 1

Hash (cost=1.17..1.17 rows=17 width=524) (actual time=0.046..0.047 rows=17 loops=1)

  • Output: subclassei29_.descricao, subclassei29_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
57. 0.021 0.021 ↑ 1.0 17 1

Seq Scan on public.tb_sub_classe subclassei29_ (cost=0.00..1.17 rows=17 width=524) (actual time=0.005..0.021 rows=17 loops=1)

  • Output: subclassei29_.descricao, subclassei29_.id
  • Buffers: shared hit=1
58. 0.105 0.199 ↑ 1.0 100 1

Hash (cost=2.00..2.00 rows=100 width=18) (actual time=0.198..0.199 rows=100 loops=1)

  • Output: tipoimpl31_.descricao, tipoimpl31_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 14kB
  • Buffers: shared hit=1
59. 0.094 0.094 ↑ 1.0 100 1

Seq Scan on public.tb_tipo tipoimpl31_ (cost=0.00..2.00 rows=100 width=18) (actual time=0.009..0.094 rows=100 loops=1)

  • Output: tipoimpl31_.descricao, tipoimpl31_.id
  • Buffers: shared hit=1
60. 0.017 0.029 ↑ 1.0 7 1

Hash (cost=1.07..1.07 rows=7 width=524) (actual time=0.028..0.029 rows=7 loops=1)

  • Output: graufolhai33_.descricao, graufolhai33_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
61. 0.012 0.012 ↑ 1.0 7 1

Seq Scan on public.tb_grau_folha graufolhai33_ (cost=0.00..1.07 rows=7 width=524) (actual time=0.005..0.012 rows=7 loops=1)

  • Output: graufolhai33_.descricao, graufolhai33_.id
  • Buffers: shared hit=1
62. 0.002 0.007 ↓ 0.0 0 1

Hash (cost=11.40..11.40 rows=140 width=524) (actual time=0.006..0.007 rows=0 loops=1)

  • Output: residuoben35_.descricao, residuoben35_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
63. 0.005 0.005 ↓ 0.0 0 1

Seq Scan on public.tb_residuo_beneficiamento residuoben35_ (cost=0.00..11.40 rows=140 width=524) (actual time=0.004..0.005 rows=0 loops=1)

  • Output: residuoben35_.descricao, residuoben35_.id
64. 0.055 0.105 ↑ 1.0 48 1

Hash (cost=1.48..1.48 rows=48 width=524) (actual time=0.104..0.105 rows=48 loops=1)

  • Output: subgrupoim28_.descricao, subgrupoim28_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=1
65. 0.050 0.050 ↑ 1.0 48 1

Seq Scan on public.tb_sub_grupo subgrupoim28_ (cost=0.00..1.48 rows=48 width=524) (actual time=0.007..0.050 rows=48 loops=1)

  • Output: subgrupoim28_.descricao, subgrupoim28_.id
  • Buffers: shared hit=1
66. 0.032 0.063 ↑ 1.0 28 1

Hash (cost=1.28..1.28 rows=28 width=524) (actual time=0.062..0.063 rows=28 loops=1)

  • Output: gramaturai41_.descricao, gramaturai41_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared hit=1
67. 0.031 0.031 ↑ 1.0 28 1

Seq Scan on public.tb_gramatura gramaturai41_ (cost=0.00..1.28 rows=28 width=524) (actual time=0.006..0.031 rows=28 loops=1)

  • Output: gramaturai41_.descricao, gramaturai41_.id
  • Buffers: shared hit=1
68. 0.002 0.010 ↓ 0.0 0 1

Hash (cost=11.40..11.40 rows=140 width=524) (actual time=0.009..0.010 rows=0 loops=1)

  • Output: residuofia43_.descricao, residuofia43_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
69. 0.008 0.008 ↓ 0.0 0 1

Seq Scan on public.tb_residuo_fiacao residuofia43_ (cost=0.00..11.40 rows=140 width=524) (actual time=0.007..0.008 rows=0 loops=1)

  • Output: residuofia43_.descricao, residuofia43_.id
70. 0.002 0.006 ↓ 0.0 0 1

Hash (cost=11.40..11.40 rows=140 width=524) (actual time=0.005..0.006 rows=0 loops=1)

  • Output: formaapres42_.descricao, formaapres42_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
71. 0.004 0.004 ↓ 0.0 0 1

Seq Scan on public.tb_forma_apresentacao formaapres42_ (cost=0.00..11.40 rows=140 width=524) (actual time=0.003..0.004 rows=0 loops=1)

  • Output: formaapres42_.descricao, formaapres42_.id
72.          

CTE serie

73. 4.969 5.283 ↑ 1.0 1,175 1

Bitmap Heap Scan on public.tb_serie s_1 (cost=13.79..444.48 rows=1,175 width=143) (actual time=0.390..5.283 rows=1,175 loops=1)

  • Output: s_1.id, s_1.id_serie, s_1.versao, s_1.data, s_1.motivo, s_1.mercado, s_1.moeda_fk, s_1.nivel_comercializacao_fk, s_1.praca_internacional_fk, s_1.formula_fk, s_1.abstract_classificacao_fk, s_1.municipio_fk, s_1.unidade_federacao_fk, s_1.mi (...)
  • Recheck Cond: ((s_1.unidade_federacao_fk)::text = 'GO'::text)
  • Heap Blocks: exact=272
  • Buffers: shared hit=277
74. 0.314 0.314 ↑ 1.0 1,175 1

Bitmap Index Scan on ix_tb_serie_unidade_federacao_fk (cost=0.00..13.50 rows=1,175 width=0) (actual time=0.313..0.314 rows=1,175 loops=1)

  • Index Cond: ((s_1.unidade_federacao_fk)::text = 'GO'::text)
  • Buffers: shared hit=5
75.          

CTE max_preco_serie

76. 246.305 1,152.411 ↑ 9.2 1,095 1

HashAggregate (cost=45,549.47..45,649.77 rows=10,030 width=16) (actual time=1,150.917..1,152.411 rows=1,095 loops=1)

  • Output: pr.serie_fk, max(pr.id)
  • Group Key: pr.serie_fk
  • Buffers: shared hit=201,909
77. 405.018 906.106 ↑ 7.7 236,554 1

Nested Loop (cost=26.87..36,498.79 rows=1,810,136 width=16) (actual time=2.484..906.106 rows=236,554 loops=1)

  • Output: pr.serie_fk, pr.id
  • Buffers: shared hit=201,909
78. 3.011 4.063 ↓ 5.9 1,175 1

HashAggregate (cost=26.44..28.44 rows=200 width=8) (actual time=2.428..4.063 rows=1,175 loops=1)

  • Output: sr.id
  • Group Key: sr.id
79. 1.052 1.052 ↑ 1.0 1,175 1

CTE Scan on serie sr (cost=0.00..23.50 rows=1,175 width=8) (actual time=0.002..1.052 rows=1,175 loops=1)

  • Output: sr.id, sr.id_serie, sr.versao, sr.data, sr.motivo, sr.mercado, sr.moeda_fk, sr.nivel_comercializacao_fk, sr.praca_internacional_fk, sr.formula_fk, sr.abstract_classificacao_fk, sr.municipio_fk, sr.unidade_federacao_fk, s (...)
80. 497.025 497.025 ↑ 1.8 201 1,175

Index Scan using ix_tb_preco_serie_fk on public.tb_preco pr (cost=0.43..178.74 rows=361 width=16) (actual time=0.011..0.423 rows=201 loops=1,175)

  • Output: pr.id, pr.valor, pr.data_inicial, pr.data_final, pr.tipo_periodo, pr.motivo, pr.serie_fk, pr.ts_atualizacao, pr.observacao, pr.motivo_padrao_preco_acima_limiar_fk
  • Index Cond: (pr.serie_fk = sr.id)
  • Buffers: shared hit=201,909
81. 3.797 1,130.452 ↑ 6.7 1,175 1

Sort (cost=7,303.87..7,323.62 rows=7,903 width=1,320) (actual time=1,129.398..1,130.452 rows=1,175 loops=1)

  • Output: s.data, s.id, s.situacao, s.unidade_federacao_fk, consulta_tipificacao.tipificacao, nc.descricao, nc.id, mun.nome, um.id, acon.quantidade_minima, acon.quantidade_maxima, medida.simbolo, me.id, me.descricao, ge.id, ge.descricao, produto.nome (...)
  • Sort Key: s.id
  • Sort Method: quicksort Memory: 358kB
  • Buffers: shared hit=3,733, temp written=78
82. 2.394 1,126.655 ↑ 6.7 1,175 1

Hash Left Join (cost=766.39..1,474.52 rows=7,903 width=1,320) (actual time=135.048..1,126.655 rows=1,175 loops=1)

  • Output: s.data, s.id, s.situacao, s.unidade_federacao_fk, consulta_tipificacao.tipificacao, nc.descricao, nc.id, mun.nome, um.id, acon.quantidade_minima, acon.quantidade_maxima, medida.simbolo, me.id, me.descricao, ge.id, ge.descricao, produt (...)
  • Inner Unique: true
  • Hash Cond: (classificacao_pgpm.produto_fk = produto_pgpm.id)
  • Buffers: shared hit=3,733, temp written=78
83. 2.424 1,118.355 ↑ 6.7 1,175 1

Hash Left Join (cost=683.70..1,371.04 rows=7,903 width=1,314) (actual time=129.093..1,118.355 rows=1,175 loops=1)

  • Output: s.data, s.id, s.situacao, s.unidade_federacao_fk, consulta_tipificacao.tipificacao, nc.descricao, nc.id, mun.nome, um.id, acon.quantidade_minima, acon.quantidade_maxima, medida.simbolo, me.id, me.descricao, ge.id, ge.descricao, (...)
  • Inner Unique: true
  • Hash Cond: (s.abstract_classificacao_fk = classificacao_pgpm.id)
  • Buffers: shared hit=3,714, temp written=78
84. 2.525 1,107.710 ↑ 6.7 1,175 1

Hash Left Join (cost=545.59..1,212.16 rows=7,903 width=1,314) (actual time=120.786..1,107.710 rows=1,175 loops=1)

  • Output: s.data, s.id, s.situacao, s.unidade_federacao_fk, s.abstract_classificacao_fk, consulta_tipificacao.tipificacao, nc.descricao, nc.id, mun.nome, um.id, acon.quantidade_minima, acon.quantidade_maxima, medida.simbolo, me.id, (...)
  • Inner Unique: true
  • Hash Cond: (cp.produto_fk = produto.id)
  • Buffers: shared hit=3,673, temp written=78
85. 2.580 1,098.963 ↑ 6.7 1,175 1

Hash Left Join (cost=462.89..1,108.69 rows=7,903 width=1,308) (actual time=114.513..1,098.963 rows=1,175 loops=1)

  • Output: s.data, s.id, s.situacao, s.unidade_federacao_fk, s.abstract_classificacao_fk, consulta_tipificacao.tipificacao, nc.descricao, nc.id, mun.nome, um.id, acon.quantidade_minima, acon.quantidade_maxima, medida.simbolo, m (...)
  • Inner Unique: true
  • Hash Cond: (classificacao.classificacao_produto_fk = cp.id)
  • Buffers: shared hit=3,654, temp written=78
86. 2.729 1,090.737 ↑ 6.7 1,175 1

Hash Left Join (cost=375.21..1,000.23 rows=7,903 width=1,308) (actual time=108.808..1,090.737 rows=1,175 loops=1)

  • Output: s.data, s.id, s.situacao, s.unidade_federacao_fk, s.abstract_classificacao_fk, consulta_tipificacao.tipificacao, nc.descricao, nc.id, mun.nome, um.id, acon.quantidade_minima, acon.quantidade_maxima, medida.simb (...)
  • Inner Unique: true
  • Hash Cond: (s.abstract_classificacao_fk = classificacao.id)
  • Buffers: shared hit=3,630, temp written=78
87. 2.260 1,071.949 ↑ 6.7 1,175 1

Hash Left Join (cost=104.12..708.38 rows=7,903 width=1,300) (actual time=92.605..1,071.949 rows=1,175 loops=1)

  • Output: s.data, s.id, s.situacao, s.unidade_federacao_fk, s.abstract_classificacao_fk, consulta_tipificacao.tipificacao, nc.descricao, nc.id, mun.nome, um.id, acon.quantidade_minima, acon.quantidade_maxima, medid (...)
  • Inner Unique: true
  • Hash Cond: (e.grupo_fk = ge.id)
  • Buffers: shared hit=3,550, temp written=78
88. 2.343 1,069.569 ↑ 6.7 1,175 1

Hash Left Join (cost=101.86..683.81 rows=7,903 width=1,292) (actual time=92.454..1,069.569 rows=1,175 loops=1)

  • Output: s.data, s.id, s.situacao, s.unidade_federacao_fk, s.abstract_classificacao_fk, consulta_tipificacao.tipificacao, nc.descricao, nc.id, mun.nome, um.id, acon.quantidade_minima, acon.quantidade_maxima, (...)
  • Inner Unique: true
  • Hash Cond: (e.material_fk = me.id)
  • Buffers: shared hit=3,549, temp written=78
89. 16.583 1,067.121 ↑ 6.7 1,175 1

Hash Join (cost=99.87..659.07 rows=7,903 width=776) (actual time=92.313..1,067.121 rows=1,175 loops=1)

  • Output: s.data, s.id, s.situacao, s.unidade_federacao_fk, s.abstract_classificacao_fk, consulta_tipificacao.tipificacao, nc.descricao, nc.id, mun.nome, um.id, acon.quantidade_minima, acon.quantidade_m (...)
  • Hash Cond: (consulta_tipificacao.id_abstract_classificacao = s.abstract_classificacao_fk)
  • Buffers: shared hit=3,548, temp written=78
90. 1,021.247 1,021.247 ↑ 1.0 12,811 1

CTE Scan on consulta_tipificacao (cost=0.00..256.22 rows=12,811 width=40) (actual time=57.504..1,021.247 rows=12,811 loops=1)

  • Output: consulta_tipificacao.id_abstract_classificacao, consulta_tipificacao.tipificacao
  • Buffers: shared hit=357, temp written=78
91. 1.802 29.291 ↓ 9.6 1,175 1

Hash (cost=98.33..98.33 rows=123 width=744) (actual time=29.290..29.291 rows=1,175 loops=1)

  • Output: s.data, s.id, s.situacao, s.unidade_federacao_fk, s.abstract_classificacao_fk, nc.descricao, nc.id, mun.nome, um.id, acon.quantidade_minima, acon.quantidade_maxima, medida.simbolo, e.mat (...)
  • Buckets: 2,048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 196kB
  • Buffers: shared hit=3,191
92. 2.205 27.489 ↓ 9.6 1,175 1

Hash Left Join (cost=20.11..98.33 rows=123 width=744) (actual time=1.819..27.489 rows=1,175 loops=1)

  • Output: s.data, s.id, s.situacao, s.unidade_federacao_fk, s.abstract_classificacao_fk, nc.descricao, nc.id, mun.nome, um.id, acon.quantidade_minima, acon.quantidade_maxima, medida.simbolo, (...)
  • Inner Unique: true
  • Hash Cond: (acon.embalagem_fk = e.id)
  • Buffers: shared hit=3,191
93. 2.224 25.215 ↓ 9.6 1,175 1

Hash Join (cost=18.45..96.32 rows=123 width=736) (actual time=1.722..25.215 rows=1,175 loops=1)

  • Output: s.data, s.id, s.situacao, s.unidade_federacao_fk, s.abstract_classificacao_fk, nc.descricao, nc.id, mun.nome, um.id, acon.quantidade_minima, acon.quantidade_maxima, acon.emba (...)
  • Inner Unique: true
  • Hash Cond: (acon.unidade_medida_fk = medida.id)
  • Buffers: shared hit=3,190
94. 2.339 22.818 ↓ 9.6 1,175 1

Hash Join (cost=15.63..93.16 rows=123 width=741) (actual time=1.523..22.818 rows=1,175 loops=1)

  • Output: s.data, s.id, s.situacao, s.unidade_federacao_fk, s.abstract_classificacao_fk, nc.descricao, nc.id, mun.nome, um.id, acon.quantidade_minima, acon.quantidade_maxima, aco (...)
  • Inner Unique: true
  • Hash Cond: (um.unidade_comercializacao_fk = acon.id)
  • Buffers: shared hit=3,189
95. 2.371 20.028 ↓ 9.6 1,175 1

Hash Join (cost=8.79..85.99 rows=123 width=723) (actual time=1.043..20.028 rows=1,175 loops=1)

  • Output: s.data, s.id, s.situacao, s.unidade_federacao_fk, s.abstract_classificacao_fk, nc.descricao, nc.id, mun.nome, um.id, um.unidade_comercializacao_fk
  • Inner Unique: true
  • Hash Cond: (s.unidade_comercializacao_conab_fk = um.id)
  • Buffers: shared hit=3,187
96. 3.192 17.213 ↓ 9.6 1,175 1

Nested Loop Left Join (cost=1.75..78.61 rows=123 width=715) (actual time=0.562..17.213 rows=1,175 loops=1)

  • Output: s.data, s.id, s.situacao, s.unidade_federacao_fk, s.abstract_classificacao_fk, s.unidade_comercializacao_conab_fk, nc.descricao, nc.id, mun.nome
  • Inner Unique: true
  • Buffers: shared hit=3,185
97. 2.572 10.496 ↓ 9.6 1,175 1

Hash Join (cost=1.47..28.12 rows=123 width=711) (actual time=0.484..10.496 rows=1,175 loops=1)

  • Output: s.data, s.id, s.situacao, s.unidade_federacao_fk, s.abstract_classificacao_fk, s.municipio_fk, s.unidade_comercializacao_conab_fk, nc.descricao, nc.id
  • Inner Unique: true
  • Hash Cond: (s.nivel_comercializacao_fk = nc.id)
  • Buffers: shared hit=278
98. 7.866 7.866 ↑ 1.0 1,175 1

CTE Scan on serie s (cost=0.00..23.50 rows=1,175 width=195) (actual time=0.395..7.866 rows=1,175 loops=1)

  • Output: s.id, s.id_serie, s.versao, s.data, s.motivo, s.mercado, s.moeda_fk, s.nivel_comercializacao_fk, s.praca_internacional_fk, s.formula_fk, s.abstr (...)
  • Buffers: shared hit=277
99. 0.027 0.058 ↑ 1.0 21 1

Hash (cost=1.21..1.21 rows=21 width=524) (actual time=0.057..0.058 rows=21 loops=1)

  • Output: nc.descricao, nc.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared hit=1
100. 0.031 0.031 ↑ 1.0 21 1

Seq Scan on public.tb_nivel_comercializacao nc (cost=0.00..1.21 rows=21 width=524) (actual time=0.011..0.031 rows=21 loops=1)

  • Output: nc.descricao, nc.id
  • Buffers: shared hit=1
101. 3.525 3.525 ↑ 1.0 1 1,175

Index Scan using tb_municipio_pkey on public.tb_municipio mun (cost=0.28..0.41 rows=1 width=20) (actual time=0.003..0.003 rows=1 loops=1,175)

  • Output: mun.id, mun.nome, mun.cd, mun.munic, mun.ds, mun.sd, mun.codigo_velho, mun.codigo_aba, mun.tipo, mun.latitude, mun.longitude, mun.altitude, mun.area, (...)
  • Index Cond: (mun.id = s.municipio_fk)
  • Buffers: shared hit=2,907
102. 0.231 0.444 ↑ 1.0 224 1

Hash (cost=4.24..4.24 rows=224 width=16) (actual time=0.443..0.444 rows=224 loops=1)

  • Output: um.id, um.unidade_comercializacao_fk
  • Buckets: 1,024 Batches: 1 Memory Usage: 19kB
  • Buffers: shared hit=2
103. 0.213 0.213 ↑ 1.0 224 1

Seq Scan on public.tb_unidade_comercializacao_conab um (cost=0.00..4.24 rows=224 width=16) (actual time=0.011..0.213 rows=224 loops=1)

  • Output: um.id, um.unidade_comercializacao_fk
  • Buffers: shared hit=2
104. 0.230 0.451 ↑ 1.0 215 1

Hash (cost=4.15..4.15 rows=215 width=34) (actual time=0.450..0.451 rows=215 loops=1)

  • Output: acon.quantidade_minima, acon.quantidade_maxima, acon.id, acon.unidade_medida_fk, acon.embalagem_fk
  • Buckets: 1,024 Batches: 1 Memory Usage: 23kB
  • Buffers: shared hit=2
105. 0.221 0.221 ↑ 1.0 215 1

Seq Scan on public.tb_acondicionamento_conab acon (cost=0.00..4.15 rows=215 width=34) (actual time=0.014..0.221 rows=215 loops=1)

  • Output: acon.quantidade_minima, acon.quantidade_maxima, acon.id, acon.unidade_medida_fk, acon.embalagem_fk
  • Buffers: shared hit=2
106. 0.090 0.173 ↑ 1.0 81 1

Hash (cost=1.81..1.81 rows=81 width=11) (actual time=0.172..0.173 rows=81 loops=1)

  • Output: medida.simbolo, medida.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
  • Buffers: shared hit=1
107. 0.083 0.083 ↑ 1.0 81 1

Seq Scan on public.tb_unidade_medida_conab medida (cost=0.00..1.81 rows=81 width=11) (actual time=0.009..0.083 rows=81 loops=1)

  • Output: medida.simbolo, medida.id
  • Buffers: shared hit=1
108. 0.035 0.069 ↑ 1.0 29 1

Hash (cost=1.29..1.29 rows=29 width=24) (actual time=0.068..0.069 rows=29 loops=1)

  • Output: e.id, e.material_fk, e.grupo_fk
  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared hit=1
109. 0.034 0.034 ↑ 1.0 29 1

Seq Scan on public.tb_embalagem e (cost=0.00..1.29 rows=29 width=24) (actual time=0.007..0.034 rows=29 loops=1)

  • Output: e.id, e.material_fk, e.grupo_fk
  • Buffers: shared hit=1
110. 0.053 0.105 ↑ 1.0 44 1

Hash (cost=1.44..1.44 rows=44 width=524) (actual time=0.104..0.105 rows=44 loops=1)

  • Output: me.id, me.descricao
  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=1
111. 0.052 0.052 ↑ 1.0 44 1

Seq Scan on public.tb_material_embalagem me (cost=0.00..1.44 rows=44 width=524) (actual time=0.012..0.052 rows=44 loops=1)

  • Output: me.id, me.descricao
  • Buffers: shared hit=1
112. 0.063 0.120 ↑ 1.0 56 1

Hash (cost=1.56..1.56 rows=56 width=16) (actual time=0.119..0.120 rows=56 loops=1)

  • Output: ge.id, ge.descricao
  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=1
113. 0.057 0.057 ↑ 1.0 56 1

Seq Scan on public.tb_grupo_embalagem ge (cost=0.00..1.56 rows=56 width=16) (actual time=0.007..0.057 rows=56 loops=1)

  • Output: ge.id, ge.descricao
  • Buffers: shared hit=1
114. 8.120 16.059 ↑ 1.0 8,493 1

Hash (cost=164.93..164.93 rows=8,493 width=16) (actual time=16.058..16.059 rows=8,493 loops=1)

  • Output: classificacao.id, classificacao.classificacao_produto_fk
  • Buckets: 16,384 Batches: 1 Memory Usage: 527kB
  • Buffers: shared hit=80
115. 7.939 7.939 ↑ 1.0 8,493 1

Seq Scan on public.tb_classificacao classificacao (cost=0.00..164.93 rows=8,493 width=16) (actual time=0.009..7.939 rows=8,493 loops=1)

  • Output: classificacao.id, classificacao.classificacao_produto_fk
  • Buffers: shared hit=80
116. 2.838 5.646 ↑ 1.0 2,830 1

Hash (cost=52.30..52.30 rows=2,830 width=16) (actual time=5.645..5.646 rows=2,830 loops=1)

  • Output: cp.id, cp.produto_fk
  • Buckets: 4,096 Batches: 1 Memory Usage: 165kB
  • Buffers: shared hit=24
117. 2.808 2.808 ↑ 1.0 2,830 1

Seq Scan on public.tb_classificacao_produto cp (cost=0.00..52.30 rows=2,830 width=16) (actual time=0.027..2.808 rows=2,830 loops=1)

  • Output: cp.id, cp.produto_fk
  • Buffers: shared hit=24
118. 3.275 6.222 ↑ 1.0 2,831 1

Hash (cost=47.31..47.31 rows=2,831 width=22) (actual time=6.222..6.222 rows=2,831 loops=1)

  • Output: produto.nome, produto.id
  • Buckets: 4,096 Batches: 1 Memory Usage: 193kB
  • Buffers: shared hit=19
119. 2.947 2.947 ↑ 1.0 2,831 1

Seq Scan on public.tb_produto produto (cost=0.00..47.31 rows=2,831 width=22) (actual time=0.012..2.947 rows=2,831 loops=1)

  • Output: produto.nome, produto.id
  • Buffers: shared hit=19
120. 4.182 8.221 ↑ 1.0 4,316 1

Hash (cost=84.16..84.16 rows=4,316 width=16) (actual time=8.220..8.221 rows=4,316 loops=1)

  • Output: classificacao_pgpm.id, classificacao_pgpm.produto_fk
  • Buckets: 8,192 Batches: 1 Memory Usage: 267kB
  • Buffers: shared hit=41
121. 4.039 4.039 ↑ 1.0 4,316 1

Seq Scan on public.tb_classificacao_pauta_pgpm classificacao_pgpm (cost=0.00..84.16 rows=4,316 width=16) (actual time=0.013..4.039 rows=4,316 loops=1)

  • Output: classificacao_pgpm.id, classificacao_pgpm.produto_fk
  • Buffers: shared hit=41
122. 3.127 5.906 ↑ 1.0 2,831 1

Hash (cost=47.31..47.31 rows=2,831 width=22) (actual time=5.905..5.906 rows=2,831 loops=1)

  • Output: produto_pgpm.nome, produto_pgpm.id
  • Buckets: 4,096 Batches: 1 Memory Usage: 193kB
  • Buffers: shared hit=19
123. 2.779 2.779 ↑ 1.0 2,831 1

Seq Scan on public.tb_produto produto_pgpm (cost=0.00..47.31 rows=2,831 width=22) (actual time=0.010..2.779 rows=2,831 loops=1)

  • Output: produto_pgpm.nome, produto_pgpm.id
  • Buffers: shared hit=19
124. 2.517 1,166.678 ↑ 9.2 1,095 1

Sort (cost=22,473.82..22,498.90 rows=10,030 width=12) (actual time=1,165.690..1,166.678 rows=1,095 loops=1)

  • Output: maxp.serie_fk, p.data_final
  • Sort Key: maxp.serie_fk
  • Sort Method: quicksort Memory: 100kB
  • Buffers: shared hit=206,292
125. 4.098 1,164.161 ↑ 9.2 1,095 1

Nested Loop Left Join (cost=0.43..21,807.23 rows=10,030 width=12) (actual time=1,150.976..1,164.161 rows=1,095 loops=1)

  • Output: maxp.serie_fk, p.data_final
  • Inner Unique: true
  • Buffers: shared hit=206,292
126. 1,154.588 1,154.588 ↑ 9.2 1,095 1

CTE Scan on max_preco_serie maxp (cost=0.00..200.60 rows=10,030 width=16) (actual time=1,150.922..1,154.588 rows=1,095 loops=1)

  • Output: maxp.serie_fk, maxp.preco_fk
  • Buffers: shared hit=201,909
127. 5.475 5.475 ↑ 1.0 1 1,095

Index Scan using tb_preco_pkey on public.tb_preco p (cost=0.43..2.15 rows=1 width=12) (actual time=0.005..0.005 rows=1 loops=1,095)

  • Output: p.id, p.valor, p.data_inicial, p.data_final, p.tipo_periodo, p.motivo, p.serie_fk, p.ts_atualizacao, p.observacao, p.motivo_padrao_preco_acima_limiar_fk
  • Index Cond: (p.id = maxp.preco_fk)
  • Buffers: shared hit=4,383
Planning time : 45.688 ms
Execution time : 2,309.229 ms