explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GXDc

Settings
# exclusive inclusive rows x rows loops node
1. 9.268 4,220.224 ↑ 3.1 1,175 1

Nested Loop Left Join (cost=66,136.64..75,245.59 rows=3,693 width=1,152) (actual time=4,114.232..4,220.224 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 (...)
  • Inner Unique: true
  • Buffers: shared hit=31,415 read=13,288, temp read=295 written=437
2.          

CTE consulta_tipificacao

3. 65.997 999.504 ↑ 1.0 12,811 1

Hash Left Join (cost=916.95..4,419.33 rows=12,811 width=40) (actual time=58.311..999.504 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.944 933.501 ↑ 1.0 12,811 1

Hash Left Join (cost=903.80..2,354.82 rows=12,811 width=9,459) (actual time=58.256..933.501 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.803 908.548 ↑ 1.0 12,811 1

Hash Left Join (cost=890.65..2,308.04 rows=12,811 width=8,951) (actual time=58.219..908.548 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.919 883.683 ↑ 1.0 12,811 1

Hash Left Join (cost=889.02..2,272.70 rows=12,811 width=8,443) (actual time=58.127..883.683 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. 25.139 857.649 ↑ 1.0 12,811 1

Hash Left Join (cost=886.94..2,235.99 rows=12,811 width=7,935) (actual time=57.981..857.649 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.528 832.503 ↑ 1.0 12,811 1

Hash Left Join (cost=873.79..2,189.21 rows=12,811 width=7,427) (actual time=57.942..832.503 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. 25.880 806.938 ↑ 1.0 12,811 1

Hash Left Join (cost=872.63..2,145.72 rows=12,811 width=6,919) (actual time=57.870..806.938 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. 25.434 780.860 ↑ 1.0 12,811 1

Hash Left Join (cost=869.38..2,107.42 rows=12,811 width=6,917) (actual time=57.639..780.860 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. 25.632 755.383 ↑ 1.0 12,811 1

Hash Left Join (cost=868.00..2,071.28 rows=12,811 width=6,409) (actual time=57.563..755.383 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.505 729.730 ↑ 1.0 12,811 1

Hash Left Join (cost=866.94..2,016.25 rows=12,811 width=5,901) (actual time=57.513..729.730 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. 25.483 704.092 ↑ 1.0 12,811 1

Hash Left Join (cost=864.47..1,979.08 rows=12,811 width=5,898) (actual time=57.346..704.092 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. 26.023 678.590 ↑ 1.0 12,811 1

Hash Left Join (cost=863.41..1,924.04 rows=12,811 width=5,390) (actual time=57.296..678.590 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. 26.227 652.548 ↑ 1.0 12,811 1

Hash Left Join (cost=862.34..1,869.01 rows=12,811 width=4,882) (actual time=57.243..652.548 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.515 625.299 ↑ 1.0 12,811 1

Hash Left Join (cost=846.03..1,818.94 rows=12,811 width=4,876) (actual time=56.189..625.299 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.945 599.753 ↑ 1.0 12,811 1

Hash Left Join (cost=844.85..1,784.09 rows=12,811 width=4,368) (actual time=56.123..599.753 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.630 573.765 ↑ 1.0 12,811 1

Hash Left Join (cost=843.51..1,744.93 rows=12,811 width=3,860) (actual time=56.040..573.765 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.963 548.068 ↑ 1.0 12,811 1

Hash Left Join (cost=842.06..1,709.69 rows=12,811 width=3,352) (actual time=55.939..548.068 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.790 522.062 ↑ 1.0 12,811 1

Hash Left Join (cost=840.93..1,674.87 rows=12,811 width=2,844) (actual time=55.858..522.062 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. 24.288 484.746 ↑ 1.0 12,811 1

Hash Left Join (cost=705.26..1,505.54 rows=12,811 width=2,716) (actual time=46.235..484.746 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.655 460.319 ↑ 1.0 12,811 1

Hash Left Join (cost=702.82..1,469.36 rows=12,811 width=2,713) (actual time=46.065..460.319 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. 24.147 424.992 ↑ 1.0 12,811 1

Hash Left Join (cost=564.71..1,297.61 rows=12,811 width=2,705) (actual time=37.267..424.992 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. 24.473 400.767 ↑ 1.0 12,811 1

Hash Left Join (cost=563.08..1,262.34 rows=12,811 width=2,197) (actual time=37.162..400.767 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.761 376.250 ↑ 1.0 12,811 1

Hash Left Join (cost=561.74..1,227.31 rows=12,811 width=1,689) (actual time=37.083..376.250 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.891 350.883 ↑ 1.0 12,811 1

Hash Left Join (cost=551.70..1,183.51 rows=12,811 width=1,680) (actual time=36.444..350.883 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.307..326.778 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.700..301.952 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.600..276.316 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.313..252. (...)
  • 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.750. (...)
  • 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.299.. (...)
  • 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.456..0.457 (...)
  • 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.030..0.031 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.506..4.507 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.252 0.252 ↑ 1.0 130 1

Hash (cost=2.30..2.30 rows=130 width=12) (actual time=0.251..0.252 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.063 1.063 ↑ 1.0 547 1

Hash (cost=9.47..9.47 rows=547 width=22) (actual time=1.062..1.063 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.577 0.577 ↑ 1.0 298 1

Hash (cost=5.98..5.98 rows=298 width=26) (actual time=0.577..0.577 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.100 0.100 ↑ 1.0 48 1

Hash (cost=1.48..1.48 rows=48 width=524) (actual time=0.099..0.100 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.606 0.606 ↑ 1.0 313 1

Hash (cost=6.13..6.13 rows=313 width=25) (actual time=0.605..0.606 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.292 (...)
  • 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.007..0.021 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.045 rows=28 (...)
  • Output: gramaturai25_.descricao, gramaturai25_.id
  • Buffers: shared hit=1
34. 8.672 8.672 ↑ 1.0 4,316 1

Hash (cost=84.16..84.16 rows=4,316 width=24) (actual time=8.671..8.672 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.015..4. (...)
  • Output: abstractcl6_2.id, abstractcl6_2.produto_fk, abstractcl6_2.classificacao_caracteristica_pauta_pgpm_fk
  • Buffers: shared hit=41
35. 0.075 0.139 ↑ 1.0 64 1

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

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

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

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

Hash (cost=83.63..83.63 rows=4,163 width=144) (actual time=9.525..9.526 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.012 (...)
  • Output: classifica26_.id, classifica26_.sub_categoria_fk, classifica26_.grao_inteiro_fk, classifica26_.cor_fk, classifica26_.categor (...)
  • Buffers: shared hit=42
38. 0.017 0.043 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=524) (actual time=0.042..0.043 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.030 0.067 ↑ 1.0 20 1

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

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

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

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

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

  • Output: corimpl37_.descricao, corimpl37_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
43. 0.018 0.018 ↑ 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.018 rows=15 loops=1)

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

Hash (cost=1.08..1.08 rows=8 width=524) (actual time=0.030..0.031 rows=8 loops=1)

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

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

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

Hash (cost=9.47..9.47 rows=547 width=22) (actual time=1.021..1.022 rows=547 loops=1)

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

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

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

Hash (cost=1.03..1.03 rows=3 width=524) (actual time=0.018..0.019 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.010 0.019 ↑ 1.0 3 1

Hash (cost=1.03..1.03 rows=3 width=524) (actual time=0.018..0.019 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.012 0.021 ↑ 1.0 3 1

Hash (cost=1.03..1.03 rows=3 width=524) (actual time=0.020..0.021 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.022 0.043 ↑ 1.0 17 1

Hash (cost=1.17..1.17 rows=17 width=524) (actual time=0.043..0.043 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.104 0.198 ↑ 1.0 100 1

Hash (cost=2.00..2.00 rows=100 width=18) (actual time=0.197..0.198 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.020 0.037 ↑ 1.0 7 1

Hash (cost=1.07..1.07 rows=7 width=524) (actual time=0.036..0.037 rows=7 loops=1)

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

Seq Scan on public.tb_grau_folha graufolhai33_ (cost=0.00..1.07 rows=7 width=524) (actual time=0.008..0.017 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.063 0.115 ↑ 1.0 48 1

Hash (cost=1.48..1.48 rows=48 width=524) (actual time=0.114..0.115 rows=48 loops=1)

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

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

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

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

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

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

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

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

  • Output: residuofia43_.descricao, residuofia43_.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
69. 0.007 0.007 ↓ 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.007 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 max_preco_serie

73. 122.565 2,938.975 ↓ 2.1 20,660 1

Finalize HashAggregate (cost=58,282.92..58,383.22 rows=10,030 width=16) (actual time=2,917.664..2,938.975 rows=20,660 loops=1)

  • Output: pr.serie_fk, max(pr.id)
  • Group Key: pr.serie_fk
  • Buffers: shared hit=26,106 read=13,288
74. 138.211 2,816.410 ↓ 2.0 81,971 1

Gather (cost=53,970.02..58,082.32 rows=40,120 width=16) (actual time=2,708.046..2,816.410 rows=81,971 loops=1)

  • Output: pr.serie_fk, (PARTIAL max(pr.id))
  • Workers Planned: 4
  • Workers Launched: 4
  • Buffers: shared hit=26,106 read=13,288
75. 991.209 2,678.199 ↓ 1.6 16,394 5 / 5

Partial HashAggregate (cost=52,970.02..53,070.32 rows=10,030 width=16) (actual time=2,659.511..2,678.199 rows=16,394 loops=5)

  • Output: pr.serie_fk, PARTIAL max(pr.id)
  • Group Key: pr.serie_fk
  • Buffers: shared hit=26,106 read=13,288
  • Worker 0: actual time=2,648.772..2666.639 rows=16,298 loops=1
  • Buffers: shared hit=5,124 read=2,654
  • Worker 1: actual time=2,648.700..2667.572 rows=16,452 loops=1
  • Buffers: shared hit=5,165 read=2,596
  • Worker 2: actual time=2,648.800..2666.749 rows=16,347 loops=1
  • Buffers: shared hit=5,126 read=2,646
  • Worker 3: actual time=2,648.736..2669.338 rows=16,570 loops=1
  • Buffers: shared hit=5,453 read=2,673
76. 1,686.990 1,686.990 ↑ 1.3 723,897 5 / 5

Parallel Seq Scan on public.tb_preco pr (cost=0.00..48,444.68 rows=905,068 width=16) (actual time=0.033..1,686.990 rows=723,897 loops=5)

  • 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
  • Buffers: shared hit=26,106 read=13,288
  • Worker 0: actual time=0.045..1687.256 rows=714,602 loops=1
  • Buffers: shared hit=5,124 read=2,654
  • Worker 1: actual time=0.009..1675.103 rows=713,092 loops=1
  • Buffers: shared hit=5,165 read=2,596
  • Worker 2: actual time=0.047..1681.665 rows=713,759 loops=1
  • Buffers: shared hit=5,126 read=2,646
  • Worker 3: actual time=0.029..1665.003 rows=746,653 loops=1
  • Buffers: shared hit=5,453 read=2,673
77. 27.498 4,202.731 ↑ 3.1 1,175 1

Hash Right Join (cost=3,333.66..4,256.77 rows=3,693 width=1,189) (actual time=4,114.053..4,202.731 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 (...)
  • Hash Cond: (maxp.serie_fk = s.id)
  • Buffers: shared hit=27,032 read=13,288, temp read=295 written=437
78. 2,978.991 2,978.991 ↓ 2.1 20,660 1

CTE Scan on max_preco_serie maxp (cost=0.00..200.60 rows=10,030 width=16) (actual time=2,917.670..2,978.991 rows=20,660 loops=1)

  • Output: maxp.serie_fk, maxp.preco_fk
  • Buffers: shared hit=26,106 read=13,288, temp written=65
79. 18.124 1,196.242 ↑ 3.1 1,175 1

Hash (cost=2,742.50..2,742.50 rows=3,693 width=1,181) (actual time=1,196.241..1,196.242 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 (...)
  • Buckets: 1,024 Batches: 8 Memory Usage: 33kB
  • Buffers: shared hit=926, temp read=184 written=281
80. 2.249 1,178.118 ↑ 3.1 1,175 1

Hash Left Join (cost=2,566.07..2,742.50 rows=3,693 width=1,181) (actual time=1,135.736..1,178.118 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: (classificacao_pgpm.produto_fk = produto_pgpm.id)
  • Buffers: shared hit=926, temp read=184 written=261
81. 2.223 1,169.982 ↑ 3.1 1,175 1

Hash Left Join (cost=2,483.37..2,650.10 rows=3,693 width=1,175) (actual time=1,129.786..1,169.982 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.descr (...)
  • Inner Unique: true
  • Hash Cond: (s.abstract_classificacao_fk = classificacao_pgpm.id)
  • Buffers: shared hit=907, temp read=184 written=261
82. 2.287 1,159.551 ↑ 3.1 1,175 1

Hash Left Join (cost=2,345.26..2,502.28 rows=3,693 width=1,175) (actual time=1,121.530..1,159.551 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: (cp.produto_fk = produto.id)
  • Buffers: shared hit=866, temp read=184 written=261
83. 2.335 1,151.969 ↑ 3.1 1,175 1

Hash Left Join (cost=2,262.56..2,409.88 rows=3,693 width=1,169) (actual time=1,116.224..1,151.969 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: (classificacao.classificacao_produto_fk = cp.id)
  • Buffers: shared hit=847, temp read=184 written=261
84. 2.404 1,144.344 ↑ 3.1 1,175 1

Hash Left Join (cost=2,174.89..2,312.50 rows=3,693 width=1,169) (actual time=1,110.922..1,144.344 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: (s.abstract_classificacao_fk = classificacao.id)
  • Buffers: shared hit=823, temp read=184 written=261
85. 2.078 1,125.859 ↑ 3.1 1,175 1

Hash Left Join (cost=1,903.80..2,031.71 rows=3,693 width=1,161) (actual time=1,094.827..1,125.859 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.grupo_fk = ge.id)
  • Buffers: shared hit=743, temp read=184 written=261
86. 2.165 1,123.662 ↑ 3.1 1,175 1

Hash Left Join (cost=1,901.54..2,019.02 rows=3,693 width=1,153) (actual time=1,094.702..1,123.662 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 (...)
  • Inner Unique: true
  • Hash Cond: (e.material_fk = me.id)
  • Buffers: shared hit=742, temp read=184 written=261
87. 13.851 1,121.402 ↑ 3.1 1,175 1

Merge Join (cost=1,899.55..2,006.41 rows=3,693 width=637) (actual time=1,094.579..1,121.402 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.quanti (...)
  • Merge Cond: (s.abstract_classificacao_fk = consulta_tipificacao.id_abstract_classificacao)
  • Buffers: shared hit=741, temp read=184 written=261
88. 3.298 36.450 ↑ 1.0 1,175 1

Sort (cost=769.29..772.23 rows=1,175 width=605) (actual time=35.419..36.450 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, (...)
  • Sort Key: s.abstract_classificacao_fk
  • Sort Method: quicksort Memory: 335kB
  • Buffers: shared hit=384
89. 2.249 33.152 ↑ 1.0 1,175 1

Hash Left Join (cost=258.97..709.37 rows=1,175 width=605) (actual time=14.248..33.152 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.si (...)
  • Inner Unique: true
  • Hash Cond: (acon.embalagem_fk = e.id)
  • Buffers: shared hit=384
90. 2.356 30.815 ↑ 1.0 1,175 1

Hash Join (cost=257.31..704.32 rows=1,175 width=597) (actual time=14.130..30.815 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: (acon.unidade_medida_fk = medida.id)
  • Buffers: shared hit=383
91. 2.389 28.278 ↑ 1.0 1,175 1

Hash Join (cost=254.49..698.25 rows=1,175 width=602) (actual time=13.905..28.278 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_maxim (...)
  • Inner Unique: true
  • Hash Cond: (um.unidade_comercializacao_fk = acon.id)
  • Buffers: shared hit=382
92. 2.328 25.435 ↑ 1.0 1,175 1

Hash Join (cost=247.65..688.27 rows=1,175 width=584) (actual time=13.421..25.435 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=380
93. 2.347 22.641 ↑ 1.0 1,175 1

Hash Left Join (cost=240.61..678.09 rows=1,175 width=576) (actual time=12.925..22.641 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
  • Hash Cond: (s.municipio_fk = mun.id)
  • Buffers: shared hit=378
94. 2.700 7.914 ↑ 1.0 1,175 1

Hash Join (cost=15.27..449.66 rows=1,175 width=572) (actual time=0.465..7.914 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, (...)
  • Inner Unique: true
  • Hash Cond: (s.nivel_comercializacao_fk = nc.id)
  • Buffers: shared hit=278
95. 4.832 5.138 ↑ 1.0 1,175 1

Bitmap Heap Scan on public.tb_serie s (cost=13.79..444.48 rows=1,175 width=56) (actual time=0.347..5.138 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 (...)
  • Recheck Cond: ((s.unidade_federacao_fk)::text = 'GO'::text)
  • Heap Blocks: exact=272
  • Buffers: shared hit=277
96. 0.306 0.306 ↑ 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.305..0.306 rows=1,175 loops=1)

  • Index Cond: ((s.unidade_federacao_fk)::text = 'GO'::text)
  • Buffers: shared hit=5
97. 0.031 0.076 ↑ 1.0 21 1

Hash (cost=1.21..1.21 rows=21 width=524) (actual time=0.075..0.076 rows=21 loops=1)

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

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

  • Output: nc.descricao, nc.id
  • Buffers: shared hit=1
99. 5.664 12.380 ↑ 1.0 5,571 1

Hash (cost=155.71..155.71 rows=5,571 width=20) (actual time=12.380..12.380 rows=5,571 loops=1)

  • Output: mun.nome, mun.id
  • Buckets: 8,192 Batches: 1 Memory Usage: 369kB
  • Buffers: shared hit=100
100. 6.716 6.716 ↑ 1.0 5,571 1

Seq Scan on public.tb_municipio mun (cost=0.00..155.71 rows=5,571 width=20) (actual time=0.033..6.716 rows=5,571 loops=1)

  • Output: mun.nome, mun.id
  • Buffers: shared hit=100
101. 0.243 0.466 ↑ 1.0 224 1

Hash (cost=4.24..4.24 rows=224 width=16) (actual time=0.465..0.466 rows=224 loops=1)

  • Output: um.id, um.unidade_comercializacao_fk
  • Buckets: 1,024 Batches: 1 Memory Usage: 19kB
  • Buffers: shared hit=2
102. 0.223 0.223 ↑ 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.013..0.223 rows=224 loops=1)

  • Output: um.id, um.unidade_comercializacao_fk
  • Buffers: shared hit=2
103. 0.236 0.454 ↑ 1.0 215 1

Hash (cost=4.15..4.15 rows=215 width=34) (actual time=0.453..0.454 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
104. 0.218 0.218 ↑ 1.0 215 1

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

  • Output: acon.quantidade_minima, acon.quantidade_maxima, acon.id, acon.unidade_medida_fk, acon.embalagem_fk
  • Buffers: shared hit=2
105. 0.087 0.181 ↑ 1.0 81 1

Hash (cost=1.81..1.81 rows=81 width=11) (actual time=0.180..0.181 rows=81 loops=1)

  • Output: medida.simbolo, medida.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
  • Buffers: shared hit=1
106. 0.094 0.094 ↑ 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.023..0.094 rows=81 loops=1)

  • Output: medida.simbolo, medida.id
  • Buffers: shared hit=1
107. 0.045 0.088 ↑ 1.0 29 1

Hash (cost=1.29..1.29 rows=29 width=24) (actual time=0.087..0.088 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
108. 0.043 0.043 ↑ 1.0 29 1

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

  • Output: e.id, e.material_fk, e.grupo_fk
  • Buffers: shared hit=1
109. 35.747 1,071.101 ↓ 1.0 13,278 1

Sort (cost=1,130.26..1,162.28 rows=12,811 width=40) (actual time=1,058.852..1,071.101 rows=13,278 loops=1)

  • Output: consulta_tipificacao.tipificacao, consulta_tipificacao.id_abstract_classificacao
  • Sort Key: consulta_tipificacao.id_abstract_classificacao
  • Sort Method: external sort Disk: 728kB
  • Buffers: shared hit=357, temp read=183 written=261
110. 1,035.354 1,035.354 ↑ 1.0 12,811 1

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

  • Output: consulta_tipificacao.tipificacao, consulta_tipificacao.id_abstract_classificacao
  • Buffers: shared hit=357, temp written=78
111. 0.045 0.095 ↑ 1.0 44 1

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

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

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

  • Output: me.id, me.descricao
  • Buffers: shared hit=1
113. 0.054 0.119 ↑ 1.0 56 1

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

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

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

  • Output: ge.id, ge.descricao
  • Buffers: shared hit=1
115. 7.977 16.081 ↑ 1.0 8,493 1

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

  • Output: classificacao.id, classificacao.classificacao_produto_fk
  • Buckets: 16,384 Batches: 1 Memory Usage: 527kB
  • Buffers: shared hit=80
116. 8.104 8.104 ↑ 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.008..8.104 rows=8,493 loops=1)

  • Output: classificacao.id, classificacao.classificacao_produto_fk
  • Buffers: shared hit=80
117. 2.565 5.290 ↑ 1.0 2,830 1

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

  • Output: cp.id, cp.produto_fk
  • Buckets: 4,096 Batches: 1 Memory Usage: 165kB
  • Buffers: shared hit=24
118. 2.725 2.725 ↑ 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.030..2.725 rows=2,830 loops=1)

  • Output: cp.id, cp.produto_fk
  • Buffers: shared hit=24
119. 2.681 5.295 ↑ 1.0 2,831 1

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

  • Output: produto.nome, produto.id
  • Buckets: 4,096 Batches: 1 Memory Usage: 193kB
  • Buffers: shared hit=19
120. 2.614 2.614 ↑ 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.011..2.614 rows=2,831 loops=1)

  • Output: produto.nome, produto.id
  • Buffers: shared hit=19
121. 4.151 8.208 ↑ 1.0 4,316 1

Hash (cost=84.16..84.16 rows=4,316 width=16) (actual time=8.207..8.208 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
122. 4.057 4.057 ↑ 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.015..4.057 rows=4,316 loops=1)

  • Output: classificacao_pgpm.id, classificacao_pgpm.produto_fk
  • Buffers: shared hit=41
123. 3.111 5.887 ↑ 1.0 2,831 1

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

  • Output: produto_pgpm.nome, produto_pgpm.id
  • Buckets: 4,096 Batches: 1 Memory Usage: 193kB
  • Buffers: shared hit=19
124. 2.776 2.776 ↑ 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.009..2.776 rows=2,831 loops=1)

  • Output: produto_pgpm.nome, produto_pgpm.id
  • Buffers: shared hit=19
125. 8.225 8.225 ↑ 1.0 1 1,175

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

  • 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 : 47.181 ms
Execution time : 4,226.170 ms