explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qW15

Settings
# exclusive inclusive rows x rows loops node
1. 10,578.050 115,773.435 ↑ 8.3 631 1

Group (cost=1,497,729.05..3,578,244.78 rows=5,212 width=686) (actual time=76,430.166..115,773.435 rows=631 loops=1)

  • Output: ct.uf_fk, '07/2019'::text, (((((lpad((programa.codigo)::text, 2, '0'::text)) || '.'::text) || (lpad((atividade.codigo)::text, 2, '0'::text))) || '.'::text) || (lpad((fonte.codigo)::text, 2, '0'::text))), ((SubPlan 1)), ((SubPlan 2)), ((SubPlan 3)), (SubPlan 4), (SubPlan 5), pr.codigo, pr.nome, pg.codigo, sg.codigo, ((SubPlan 6)), sigest.fc_valor_kardex_estoque(es.id, '2019-07-31'::character varying, 'quantidade'::character varying), es.unidade_medida, sigest.fc_calculo_valor_seguro_armazenagem(sigest.fc_valor_kardex_estoque(es.id, '2019-07-31'::character varying, 'quantidade'::character varying), pr.sobre_taxa_fk, '201907'::character varying, ct.uf_fk, (sg.codigo)::character varying, 'sobreTaxa'::character varying, pr.codigo), sigest.fc_calculo_valor_seguro_armazenagem(sigest.fc_valor_kardex_estoque(es.id, '2019-07-31'::character varying, 'quantidade'::character varying), pr.sobre_taxa_fk, '201907'::character varying, ct.uf_fk, (sg.codigo)::character varying, 'vlSegurado'::character varying, pr.codigo), sigest.fc_calculo_valor_seguro_armazenagem(sigest.fc_valor_kardex_estoque(es.id, '2019-07-31'::character varying, 'quantidade'::character varying), pr.sobre_taxa_fk, '201907'::character varying, ct.uf_fk, (sg.codigo)::character varying, 'taxaClass'::character varying, pr.codigo), sigest.fc_calculo_valor_seguro_armazenagem(sigest.fc_valor_kardex_estoque(es.id, '2019-07-31'::character varying, 'quantidade'::character varying), pr.sobre_taxa_fk, '201907'::character varying, ct.uf_fk, (sg.codigo)::character varying, 'vlPremio'::character varying, pr.codigo), cj.programa_fk, ct.atividade_fk, ct.fonte_fk, es.id, sg.codigo, pr.sobre_taxa_fk, ((SubPlan 7)), ((SubPlan 8)), (lpad((programa.codigo)::text, 2, '0'::text)), programa.nome, (lpad((atividade.codigo)::text, 2, '0'::text)), atividade.nome, (lpad((fonte.codigo)::text, 2, '0'::text)), fonte.nome
  • Group Key: ct.uf_fk, cj.programa_fk, ct.atividade_fk, ct.fonte_fk, ((SubPlan 1)), pr.codigo, pr.nome, es.id, sg.codigo, pr.sobre_taxa_fk, ((SubPlan 2)), ((SubPlan 3)), ((SubPlan 7)), ((SubPlan 8)), pg.codigo, sg.codigo, ((SubPlan 6)), (lpad((programa.codigo)::text, 2, '0'::text)), programa.nome, (lpad((atividade.codigo)::text, 2, '0'::text)), atividade.nome, (lpad((fonte.codigo)::text, 2, '0'::text)), fonte.nome
2. 8.783 76,348.589 ↑ 8.3 631 1

Sort (cost=1,497,729.05..1,497,742.08 rows=5,212 width=441) (actual time=76,347.265..76,348.589 rows=631 loops=1)

  • Output: ct.uf_fk, ((SubPlan 1)), ((SubPlan 2)), ((SubPlan 3)), pr.codigo, pr.nome, pg.codigo, sg.codigo, ((SubPlan 6)), cj.programa_fk, ct.atividade_fk, ct.fonte_fk, es.id, sg.codigo, pr.sobre_taxa_fk, ((SubPlan 7)), ((SubPlan 8)), (lpad((programa.codigo)::text, 2, '0'::text)), programa.nome, (lpad((atividade.codigo)::text, 2, '0'::text)), atividade.nome, (lpad((fonte.codigo)::text, 2, '0'::text)), fonte.nome, programa.codigo, atividade.codigo, fonte.codigo, es.codigo_cda, es.unidade_medida
  • Sort Key: ct.uf_fk, cj.programa_fk, ct.atividade_fk, ct.fonte_fk, ((SubPlan 1)), pr.codigo, pr.nome, es.id, sg.codigo, pr.sobre_taxa_fk, ((SubPlan 2)), ((SubPlan 3)), ((SubPlan 7)), ((SubPlan 8)), pg.codigo, ((SubPlan 6)), (lpad((programa.codigo)::text, 2, '0'::text)), programa.nome, (lpad((atividade.codigo)::text, 2, '0'::text)), atividade.nome, (lpad((fonte.codigo)::text, 2, '0'::text)), fonte.nome
  • Sort Method: quicksort Memory: 349kB
3. 35.559 76,339.806 ↑ 8.3 631 1

Hash Left Join (cost=870.10..1,497,407.27 rows=5,212 width=441) (actual time=1,327.115..76,339.806 rows=631 loops=1)

  • Output: ct.uf_fk, (SubPlan 1), (SubPlan 2), (SubPlan 3), pr.codigo, pr.nome, pg.codigo, sg.codigo, (SubPlan 6), cj.programa_fk, ct.atividade_fk, ct.fonte_fk, es.id, sg.codigo, pr.sobre_taxa_fk, (SubPlan 7), (SubPlan 8), lpad((programa.codigo)::text, 2, '0'::text), programa.nome, lpad((atividade.codigo)::text, 2, '0'::text), atividade.nome, lpad((fonte.codigo)::text, 2, '0'::text), fonte.nome, programa.codigo, atividade.codigo, fonte.codigo, es.codigo_cda, es.unidade_medida
  • Hash Cond: ((cj.programa_fk = programa.id) AND (ct.atividade_fk = atividade.id) AND (ct.fonte_fk = fonte.id) AND ((ct.uf_fk)::text = (uf.sigla)::text))
4. 3.659 14,819.327 ↑ 8.3 631 1

Hash Join (cost=495.08..15,148.45 rows=5,212 width=115) (actual time=129.075..14,819.327 rows=631 loops=1)

  • Output: es.codigo_cda, es.id, es.unidade_medida, ct.uf_fk, ct.atividade_fk, ct.fonte_fk, cj.programa_fk, pg.codigo, pr.codigo, pr.nome, pr.sobre_taxa_fk, sg.codigo
  • Hash Cond: (es.conta_fk = ct.id)
5. 3.211 14,810.122 ↑ 12.9 631 1

Hash Join (cost=450.40..15,021.04 rows=8,163 width=92) (actual time=123.502..14,810.122 rows=631 loops=1)

  • Output: es.codigo_cda, es.id, es.unidade_medida, es.conta_fk, pr.codigo, pr.nome, pr.sobre_taxa_fk, sg.codigo
  • Inner Unique: true
  • Hash Cond: (pr.seguro_fk = sg.id)
6. 5.005 14,806.575 ↑ 12.9 631 1

Hash Join (cost=444.25..14,992.81 rows=8,163 width=98) (actual time=123.134..14,806.575 rows=631 loops=1)

  • Output: es.codigo_cda, es.id, es.unidade_medida, es.conta_fk, pr.codigo, pr.nome, pr.sobre_taxa_fk, pr.seguro_fk
  • Inner Unique: true
  • Hash Cond: (es.produto_fk = pr.id)
7. 14,792.020 14,795.276 ↑ 12.9 631 1

Bitmap Heap Scan on sigest.tb_estoque es (cost=267.52..14,794.62 rows=8,163 width=38) (actual time=116.692..14,795.276 rows=631 loops=1)

  • Output: es.id, es.conta_fk, es.produto_fk, es.codigo_cda, es.codigo_cpr, es.safra, es.classificacao, es.acondicionamento, es.unidade_medida, es.lote, es.ean, es.data_validade, es.data_distribuicao, es.data_fabricacao, es.valor_unitario, es.valor_unitario_sede, es.custo_liquido, es.custo_liquido_sede, es.volume, es.volume_sede, es.quantidade, es.quantidade_sede, es.quantidade_reservado, es.status, es.data_fechamento, es.rendimento, es.fechado, es.id_antigo, es.uf_antigo, es.libera_estoque_data_vencida, es.codigo_contrato
  • Recheck Cond: (es.codigo_cda IS NOT NULL)
  • Filter: (sigest.fc_valor_kardex_estoque(es.id, '2019-07-31'::character varying, 'quantidade'::character varying) > '0'::numeric)
  • Rows Removed by Filter: 23827
  • Heap Blocks: exact=3344
8. 3.256 3.256 ↑ 1.0 24,471 1

Bitmap Index Scan on idx_tb_estoque_codigo_cda_text (cost=0.00..265.48 rows=24,488 width=0) (actual time=3.255..3.256 rows=24,471 loops=1)

  • Index Cond: (es.codigo_cda IS NOT NULL)
9. 2.874 6.294 ↓ 1.0 2,394 1

Hash (cost=146.88..146.88 rows=2,388 width=76) (actual time=6.293..6.294 rows=2,394 loops=1)

  • Output: pr.codigo, pr.nome, pr.sobre_taxa_fk, pr.id, pr.seguro_fk
  • Buckets: 4096 Batches: 1 Memory Usage: 286kB
10. 3.420 3.420 ↓ 1.0 2,394 1

Seq Scan on sigest.tb_produto pr (cost=0.00..146.88 rows=2,388 width=76) (actual time=0.013..3.420 rows=2,394 loops=1)

  • Output: pr.codigo, pr.nome, pr.sobre_taxa_fk, pr.id, pr.seguro_fk
11. 0.160 0.336 ↑ 1.0 140 1

Hash (cost=4.40..4.40 rows=140 width=10) (actual time=0.335..0.336 rows=140 loops=1)

  • Output: sg.codigo, sg.id
  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
12. 0.176 0.176 ↑ 1.0 140 1

Seq Scan on sigest.tb_seguro sg (cost=0.00..4.40 rows=140 width=10) (actual time=0.009..0.176 rows=140 loops=1)

  • Output: sg.codigo, sg.id
13. 0.594 5.546 ↓ 1.6 484 1

Hash (cost=40.82..40.82 rows=309 width=39) (actual time=5.545..5.546 rows=484 loops=1)

  • Output: ct.uf_fk, ct.atividade_fk, ct.fonte_fk, ct.id, cj.programa_fk, pg.codigo
  • Buckets: 1024 Batches: 1 Memory Usage: 44kB
14. 0.926 4.952 ↓ 1.6 484 1

Hash Join (cost=11.45..40.82 rows=309 width=39) (actual time=0.626..4.952 rows=484 loops=1)

  • Output: ct.uf_fk, ct.atividade_fk, ct.fonte_fk, ct.id, cj.programa_fk, pg.codigo
  • Inner Unique: true
  • Hash Cond: (ct.fonte_fk = ft.id)
15. 0.922 3.983 ↓ 1.6 484 1

Hash Join (cost=10.29..38.36 rows=309 width=39) (actual time=0.560..3.983 rows=484 loops=1)

  • Output: ct.uf_fk, ct.atividade_fk, ct.fonte_fk, ct.id, cj.programa_fk, pg.codigo
  • Inner Unique: true
  • Hash Cond: (ct.atividade_fk = at.id)
16. 0.938 3.022 ↓ 1.6 484 1

Hash Join (cost=9.00..35.99 rows=309 width=39) (actual time=0.498..3.022 rows=484 loops=1)

  • Output: ct.uf_fk, ct.atividade_fk, ct.fonte_fk, ct.id, cj.programa_fk, pg.codigo
  • Inner Unique: true
  • Hash Cond: (cj.programa_fk = pg.id)
17. 0.978 2.061 ↓ 1.6 484 1

Hash Join (cost=7.91..33.23 rows=309 width=35) (actual time=0.439..2.061 rows=484 loops=1)

  • Output: ct.uf_fk, ct.atividade_fk, ct.fonte_fk, ct.id, cj.programa_fk
  • Inner Unique: true
  • Hash Cond: (ct.cnpj_fk = cj.id)
18. 0.741 0.741 ↓ 1.6 484 1

Index Scan using idx_conta_uf_fk_atividade_fk_conta_fk on sigest.tb_conta ct (cost=0.27..24.75 rows=309 width=35) (actual time=0.071..0.741 rows=484 loops=1)

  • Output: ct.id, ct.uf_fk, ct.cnpj_fk, ct.atividade_fk, ct.fonte_fk, ct.pgpm, ct.estoque_por_preco, ct.controlar_validade, ct.id_antigo, ct.uf_antigo
  • Index Cond: ((ct.uf_fk)::text = ANY ('{AC,AL,AM,AP,BA,CE,DF,ES,GO,MA,MG,MS,MT,PA,PB,PE,PI,PR,RJ,RN,RO,RR,RS,SC,SE,SP,TO}'::text[]))
19. 0.123 0.342 ↑ 1.0 108 1

Hash (cost=6.29..6.29 rows=108 width=16) (actual time=0.341..0.342 rows=108 loops=1)

  • Output: cj.programa_fk, cj.id
  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
20. 0.219 0.219 ↑ 1.0 108 1

Index Only Scan using idx_cnpj_id_programa_fk on sigest.tb_cnpj cj (cost=0.27..6.29 rows=108 width=16) (actual time=0.066..0.219 rows=108 loops=1)

  • Output: cj.programa_fk, cj.id
  • Heap Fetches: 83
21. 0.012 0.023 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=12) (actual time=0.022..0.023 rows=4 loops=1)

  • Output: pg.codigo, pg.id
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
22. 0.011 0.011 ↑ 1.0 4 1

Seq Scan on sigest.tb_programa pg (cost=0.00..1.04 rows=4 width=12) (actual time=0.006..0.011 rows=4 loops=1)

  • Output: pg.codigo, pg.id
23. 0.020 0.039 ↑ 1.0 13 1

Hash (cost=1.13..1.13 rows=13 width=8) (actual time=0.039..0.039 rows=13 loops=1)

  • Output: at.id
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
24. 0.019 0.019 ↑ 1.0 13 1

Seq Scan on sigest.tb_atividade at (cost=0.00..1.13 rows=13 width=8) (actual time=0.005..0.019 rows=13 loops=1)

  • Output: at.id
25. 0.021 0.043 ↑ 1.0 7 1

Hash (cost=1.07..1.07 rows=7 width=8) (actual time=0.042..0.043 rows=7 loops=1)

  • Output: ft.id
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
26. 0.022 0.022 ↑ 1.0 7 1

Seq Scan on sigest.tb_fonte ft (cost=0.00..1.07 rows=7 width=8) (actual time=0.014..0.022 rows=7 loops=1)

  • Output: ft.id
27. 2.205 1,107.685 ↓ 2.5 484 1

Hash (cost=371.12..371.12 rows=195 width=69) (actual time=1,107.685..1,107.685 rows=484 loops=1)

  • Output: uf.sigla, programa.codigo, programa.nome, programa.id, atividade.codigo, atividade.nome, atividade.id, fonte.codigo, fonte.nome, fonte.id
  • Buckets: 1024 Batches: 1 Memory Usage: 61kB
28. 306.852 1,105.480 ↓ 2.5 484 1

Nested Loop (cost=18.74..371.12 rows=195 width=69) (actual time=6.435..1,105.480 rows=484 loops=1)

  • Output: uf.sigla, programa.codigo, programa.nome, programa.id, atividade.codigo, atividade.nome, atividade.id, fonte.codigo, fonte.nome, fonte.id
29. 3.210 21.324 ↓ 7.4 484 1

Nested Loop (cost=17.30..203.35 rows=65 width=77) (actual time=3.462..21.324 rows=484 loops=1)

  • Output: uf.sigla, programa.codigo, programa.nome, programa.id, atividade.codigo, atividade.nome, atividade.id, fonte.codigo, fonte.nome, fonte.id, vinculo_sigest.agente_corporativo_fk
  • Inner Unique: true
30. 1.585 12.306 ↓ 7.4 484 1

Hash Join (cost=16.87..32.42 rows=65 width=77) (actual time=3.423..12.306 rows=484 loops=1)

  • Output: uf.sigla, cnpj.vinculo_sigest_fk, programa.codigo, programa.nome, programa.id, atividade.codigo, atividade.nome, atividade.id, fonte.codigo, fonte.nome, fonte.id
  • Inner Unique: true
  • Hash Cond: (conta.fonte_fk = fonte.id)
31. 1.420 10.690 ↓ 7.4 484 1

Hash Join (cost=15.72..30.99 rows=65 width=69) (actual time=3.384..10.690 rows=484 loops=1)

  • Output: conta.fonte_fk, uf.sigla, cnpj.vinculo_sigest_fk, programa.codigo, programa.nome, programa.id, atividade.codigo, atividade.nome, atividade.id
  • Inner Unique: true
  • Hash Cond: (conta.atividade_fk = atividade.id)
32. 1.405 9.212 ↓ 7.4 484 1

Hash Join (cost=14.42..29.47 rows=65 width=50) (actual time=3.319..9.212 rows=484 loops=1)

  • Output: conta.atividade_fk, conta.fonte_fk, uf.sigla, cnpj.vinculo_sigest_fk, programa.codigo, programa.nome, programa.id
  • Inner Unique: true
  • Hash Cond: (cnpj.programa_fk = programa.id)
33. 1.476 7.772 ↓ 7.4 484 1

Hash Join (cost=13.33..28.03 rows=65 width=38) (actual time=3.269..7.772 rows=484 loops=1)

  • Output: conta.atividade_fk, conta.fonte_fk, uf.sigla, cnpj.programa_fk, cnpj.vinculo_sigest_fk
  • Inner Unique: true
  • Hash Cond: (conta.cnpj_fk = cnpj.id)
34. 2.276 6.037 ↓ 7.4 484 1

Hash Join (cost=2.90..17.42 rows=65 width=30) (actual time=2.980..6.037 rows=484 loops=1)

  • Output: conta.cnpj_fk, conta.atividade_fk, conta.fonte_fk, uf.sigla
  • Hash Cond: ((conta.uf_fk)::text = (uf.sigla)::text)
35. 0.836 0.836 ↑ 1.0 484 1

Seq Scan on sigest.tb_conta conta (cost=0.00..10.84 rows=484 width=27) (actual time=0.007..0.836 rows=484 loops=1)

  • Output: conta.id, conta.uf_fk, conta.cnpj_fk, conta.atividade_fk, conta.fonte_fk, conta.pgpm, conta.estoque_por_preco, conta.controlar_validade, conta.id_antigo, conta.uf_antigo
36. 0.039 2.925 ↑ 1.0 27 1

Hash (cost=2.57..2.57 rows=27 width=3) (actual time=2.924..2.925 rows=27 loops=1)

  • Output: uf.sigla
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
37. 2.886 2.886 ↑ 1.0 27 1

Foreign Scan on public.tb_uf uf (cost=1.00..2.57 rows=27 width=3) (actual time=2.861..2.886 rows=27 loops=1)

  • Output: uf.sigla
  • Remote SQL: SELECT sigla FROM public.tb_uf
38. 0.120 0.259 ↑ 1.0 108 1

Hash (cost=9.08..9.08 rows=108 width=24) (actual time=0.258..0.259 rows=108 loops=1)

  • Output: cnpj.id, cnpj.programa_fk, cnpj.vinculo_sigest_fk
  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
39. 0.139 0.139 ↑ 1.0 108 1

Seq Scan on sigest.tb_cnpj cnpj (cost=0.00..9.08 rows=108 width=24) (actual time=0.012..0.139 rows=108 loops=1)

  • Output: cnpj.id, cnpj.programa_fk, cnpj.vinculo_sigest_fk
40. 0.022 0.035 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=20) (actual time=0.034..0.035 rows=4 loops=1)

  • Output: programa.codigo, programa.nome, programa.id
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
41. 0.013 0.013 ↑ 1.0 4 1

Seq Scan on sigest.tb_programa programa (cost=0.00..1.04 rows=4 width=20) (actual time=0.008..0.013 rows=4 loops=1)

  • Output: programa.codigo, programa.nome, programa.id
42. 0.036 0.058 ↑ 1.0 13 1

Hash (cost=1.13..1.13 rows=13 width=27) (actual time=0.057..0.058 rows=13 loops=1)

  • Output: atividade.codigo, atividade.nome, atividade.id
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
43. 0.022 0.022 ↑ 1.0 13 1

Seq Scan on sigest.tb_atividade atividade (cost=0.00..1.13 rows=13 width=27) (actual time=0.007..0.022 rows=13 loops=1)

  • Output: atividade.codigo, atividade.nome, atividade.id
44. 0.011 0.031 ↑ 1.0 7 1

Hash (cost=1.07..1.07 rows=7 width=16) (actual time=0.030..0.031 rows=7 loops=1)

  • Output: fonte.codigo, fonte.nome, fonte.id
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
45. 0.020 0.020 ↑ 1.0 7 1

Seq Scan on sigest.tb_fonte fonte (cost=0.00..1.07 rows=7 width=16) (actual time=0.011..0.020 rows=7 loops=1)

  • Output: fonte.codigo, fonte.nome, fonte.id
46. 5.808 5.808 ↑ 1.0 1 484

Index Scan using pk_tb_vinculo_sigest on sigest.tb_vinculo_sigest vinculo_sigest (cost=0.42..2.63 rows=1 width=16) (actual time=0.012..0.012 rows=1 loops=484)

  • Output: vinculo_sigest.id, vinculo_sigest.agente_corporativo_fk, vinculo_sigest.fantasia, vinculo_sigest.fisica_juridica, vinculo_sigest.produtor_rural, vinculo_sigest.transportadora, vinculo_sigest.contribuinte, vinculo_sigest.conab, vinculo_sigest.optante, vinculo_sigest.suframa, vinculo_sigest.ix_endereco_principal, vinculo_sigest.id_antigo, vinculo_sigest.uf_antigo, vinculo_sigest.tipo_tributacao
  • Index Cond: (vinculo_sigest.id = cnpj.vinculo_sigest_fk)
47. 777.304 777.304 ↑ 1.0 1 484

Foreign Scan on public.vw_agente agente (cost=1.44..2.57 rows=1 width=8) (actual time=1.605..1.606 rows=1 loops=484)

  • Output: agente.id, agente.nome, agente.nome_fantasia, agente.cpf_cnpj
  • Remote SQL: SELECT id FROM public.vw_agente WHERE (($1::bigint = id))
48.          

SubPlan (for Hash Left Join)

49. 525.623 8,887.004 ↑ 1.0 1 631

Limit (cost=56.27..56.54 rows=1 width=64) (actual time=14.080..14.084 rows=1 loops=631)

  • Output: (sigest.fc_formatar(am.cnpj_cpf, 'cnpj'::character varying)), am.status
50. 8,361.381 8,361.381 ↑ 2.0 1 631

Foreign Scan on public.vw_armazem_dados_basicos_sem_contato am (cost=56.27..56.80 rows=2 width=64) (actual time=13.249..13.251 rows=1 loops=631)

  • Output: sigest.fc_formatar(am.cnpj_cpf, 'cnpj'::character varying), am.status
  • Remote SQL: SELECT cnpj_cpf, status FROM public.vw_armazem_dados_basicos_sem_contato WHERE (($1::character varying(11)::text = cda::text)) ORDER BY status ASC NULLS LAST
51. 7.572 12,761.344 ↑ 1.0 1 631

Limit (cost=56.30..56.30 rows=1 width=64) (actual time=20.217..20.224 rows=1 loops=631)

  • Output: (btrim((am_1.armazenador)::text)), am_1.status
52. 458.737 12,753.772 ↑ 2.0 1 631

Sort (cost=56.30..56.30 rows=2 width=64) (actual time=20.211..20.212 rows=1 loops=631)

  • Output: (btrim((am_1.armazenador)::text)), am_1.status
  • Sort Key: am_1.status
  • Sort Method: quicksort Memory: 25kB
53. 12,295.035 12,295.035 ↑ 2.0 1 631

Foreign Scan on public.vw_armazem_dados_basicos_sem_contato am_1 (cost=5.28..56.29 rows=2 width=64) (actual time=19.482..19.485 rows=1 loops=631)

  • Output: btrim((am_1.armazenador)::text), am_1.status
  • Remote SQL: SELECT armazenador, status FROM public.vw_armazem_dados_basicos_sem_contato WHERE (($1::character varying(11)::text = cda::text))
54. 6.941 12,751.879 ↑ 1.0 1 631

Limit (cost=56.29..56.29 rows=1 width=64) (actual time=20.202..20.209 rows=1 loops=631)

  • Output: am_2.cda_formatado, am_2.status
55. 450.534 12,744.938 ↑ 2.0 1 631

Sort (cost=56.29..56.30 rows=2 width=64) (actual time=20.197..20.198 rows=1 loops=631)

  • Output: am_2.cda_formatado, am_2.status
  • Sort Key: am_2.status
  • Sort Method: quicksort Memory: 25kB
56. 12,294.404 12,294.404 ↑ 2.0 1 631

Foreign Scan on public.vw_armazem_dados_basicos_sem_contato am_2 (cost=5.28..56.28 rows=2 width=64) (actual time=19.481..19.484 rows=1 loops=631)

  • Output: am_2.cda_formatado, am_2.status
  • Remote SQL: SELECT cda_formatado, status FROM public.vw_armazem_dados_basicos_sem_contato WHERE (($1::character varying(11)::text = cda::text))
57. 5.679 20.192 ↑ 1.0 1 631

Limit (cost=0.28..2.50 rows=1 width=17) (actual time=0.029..0.032 rows=1 loops=631)

  • Output: tb_sobre_taxa.descricao
58. 14.513 14.513 ↑ 1.0 1 631

Index Scan using pk_tb_sobre_taxa on sigest.tb_sobre_taxa (cost=0.28..2.50 rows=1 width=17) (actual time=0.022..0.023 rows=1 loops=631)

  • Output: tb_sobre_taxa.descricao
  • Index Cond: (tb_sobre_taxa.id = pr.sobre_taxa_fk)
59. 6.941 12,871.769 ↑ 1.0 1 631

Limit (cost=56.29..56.29 rows=1 width=71) (actual time=20.392..20.399 rows=1 loops=631)

  • Output: am_5.municipio, am_5.status
60. 462.523 12,864.828 ↑ 2.0 1 631

Sort (cost=56.29..56.30 rows=2 width=71) (actual time=20.387..20.388 rows=1 loops=631)

  • Output: am_5.municipio, am_5.status
  • Sort Key: am_5.status
  • Sort Method: quicksort Memory: 25kB
61. 12,402.305 12,402.305 ↑ 2.0 1 631

Foreign Scan on public.vw_armazem_dados_basicos_sem_contato am_5 (cost=5.28..56.28 rows=2 width=71) (actual time=19.652..19.655 rows=1 loops=631)

  • Output: am_5.municipio, am_5.status
  • Remote SQL: SELECT municipio, status FROM public.vw_armazem_dados_basicos_sem_contato WHERE (($1::character varying(11)::text = cda::text))
62. 8.834 13,085.047 ↑ 1.0 1 631

Limit (cost=56.29..56.29 rows=1 width=38) (actual time=20.730..20.737 rows=1 loops=631)

  • Output: am_6.uf, am_6.status
63. 462.523 13,076.213 ↑ 2.0 1 631

Sort (cost=56.29..56.30 rows=2 width=38) (actual time=20.722..20.723 rows=1 loops=631)

  • Output: am_6.uf, am_6.status
  • Sort Key: am_6.status
  • Sort Method: quicksort Memory: 25kB
64. 12,613.690 12,613.690 ↑ 2.0 1 631

Foreign Scan on public.vw_armazem_dados_basicos_sem_contato am_6 (cost=5.28..56.28 rows=2 width=38) (actual time=19.987..19.990 rows=1 loops=631)

  • Output: am_6.uf, am_6.status
  • Remote SQL: SELECT uf, status FROM public.vw_armazem_dados_basicos_sem_contato WHERE (($1::character varying(11)::text = cda::text))
65.          

SubPlan (for Group)

66. 6.310 14,709.241 ↑ 1.0 1 631

Limit (cost=56.29..56.29 rows=1 width=71) (actual time=23.304..23.311 rows=1 loops=631)

  • Output: am_3.municipio, am_3.status
67. 858.160 14,702.931 ↑ 2.0 1 631

Sort (cost=56.29..56.30 rows=2 width=71) (actual time=23.300..23.301 rows=1 loops=631)

  • Output: am_3.municipio, am_3.status
  • Sort Key: am_3.status
  • Sort Method: quicksort Memory: 25kB
68. 13,844.771 13,844.771 ↑ 2.0 1 631

Foreign Scan on public.vw_armazem_dados_basicos_sem_contato am_3 (cost=5.28..56.28 rows=2 width=71) (actual time=21.938..21.941 rows=1 loops=631)

  • Output: am_3.municipio, am_3.status
  • Remote SQL: SELECT municipio, status FROM public.vw_armazem_dados_basicos_sem_contato WHERE (($1::character varying(11)::text = cda::text))
69. 6.941 14,137.555 ↑ 1.0 1 631

Limit (cost=56.29..56.29 rows=1 width=38) (actual time=22.398..22.405 rows=1 loops=631)

  • Output: am_4.uf, am_4.status
70. 516.158 14,130.614 ↑ 2.0 1 631

Sort (cost=56.29..56.30 rows=2 width=38) (actual time=22.393..22.394 rows=1 loops=631)

  • Output: am_4.uf, am_4.status
  • Sort Key: am_4.status
  • Sort Method: quicksort Memory: 25kB
71. 13,614.456 13,614.456 ↑ 2.0 1 631

Foreign Scan on public.vw_armazem_dados_basicos_sem_contato am_4 (cost=5.28..56.28 rows=2 width=38) (actual time=21.573..21.576 rows=1 loops=631)

  • Output: am_4.uf, am_4.status
  • Remote SQL: SELECT uf, status FROM public.vw_armazem_dados_basicos_sem_contato WHERE (($1::character varying(11)::text = cda::text))
Planning time : 858.671 ms
Execution time : 115,782.411 ms