explain.depesz.com

PostgreSQL's explain analyze made readable

Result: twoS

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 2,684.651 ↑ 1.0 50 1

Limit (cost=299,086.88..299,122.89 rows=50 width=575) (actual time=2,675.203..2,684.651 rows=50 loops=1)

  • Output: "*SELECT* 1".codigo, "*SELECT* 1".dhemissao, "*SELECT* 1".datavencimento, "*SELECT* 1".documento, "*SELECT* 1".tipodocumento_codigo, "*SELECT* 1".tipodocumento_descricao, "*SELECT* 1".prevendas_codigo, "*SELECT* 1".contasareceber_avulsas_codigo, "*SELECT* 1".saidasnf_codigo, "*SELECT* 1".entidade_codigo, "*SELECT* 1".entidade, "*SELECT* 1".clientes_codigo, "*SELECT* 1".clientes_nome, "*SELECT* 1".valor, "*SELECT* 1".situacoescontas_codigo, "*SELECT* 1".situacao, "*SELECT* 1".gruposcontas_codigo, "*SELECT* 1".gruposcontas_descricao, "*SELECT* 1".statusconta_codigo, "*SELECT* 1".observacao, (("*SELECT* 1".estornapagamento AND (NOT "*SELECT* 1".aceitapagamento))), (("*SELECT* 1".estornaconta AND "*SELECT* 1".aceitapagamento)), "*SELECT* 1".aceitapagamento, "*SELECT* 1".estornapagamento, "*SELECT* 1".vendedores_codigo, "*SELECT* 1".vendedores_nome, "*SELECT* 1".tecnicos_codigo, "*SELECT* 1".tecnicos_nome, crpg.dhpagamento
2. 0.040 2,684.643 ↑ 39,673,285.6 50 1

Nested Loop Left Join (cost=299,086.88..1,428,965,382.96 rows=1,983,664,280 width=575) (actual time=2,675.201..2,684.643 rows=50 loops=1)

  • Output: "*SELECT* 1".codigo, "*SELECT* 1".dhemissao, "*SELECT* 1".datavencimento, "*SELECT* 1".documento, "*SELECT* 1".tipodocumento_codigo, "*SELECT* 1".tipodocumento_descricao, "*SELECT* 1".prevendas_codigo, "*SELECT* 1".contasareceber_avulsas_codigo, "*SELECT* 1".saidasnf_codigo, "*SELECT* 1".entidade_codigo, "*SELECT* 1".entidade, "*SELECT* 1".clientes_codigo, "*SELECT* 1".clientes_nome, "*SELECT* 1".valor, "*SELECT* 1".situacoescontas_codigo, "*SELECT* 1".situacao, "*SELECT* 1".gruposcontas_codigo, "*SELECT* 1".gruposcontas_descricao, "*SELECT* 1".statusconta_codigo, "*SELECT* 1".observacao, ("*SELECT* 1".estornapagamento AND (NOT "*SELECT* 1".aceitapagamento)), ("*SELECT* 1".estornaconta AND "*SELECT* 1".aceitapagamento), "*SELECT* 1".aceitapagamento, "*SELECT* 1".estornapagamento, "*SELECT* 1".vendedores_codigo, "*SELECT* 1".vendedores_nome, "*SELECT* 1".tecnicos_codigo, "*SELECT* 1".tecnicos_nome, crpg.dhpagamento
3. 0.010 2,684.303 ↑ 39,673,285.6 50 1

Append (cost=299,086.45..531,308,608.26 rows=1,983,664,280 width=566) (actual time=2,675.187..2,684.303 rows=50 loops=1)

4. 0.018 2,684.293 ↑ 39,608,971.9 50 1

Subquery Scan on *SELECT* 1 (cost=299,086.45..520,397,301.51 rows=1,980,448,594 width=566) (actual time=2,675.185..2,684.293 rows=50 loops=1)

  • Output: "*SELECT* 1".codigo, "*SELECT* 1".dhemissao, "*SELECT* 1".datavencimento, "*SELECT* 1".documento, "*SELECT* 1".tipodocumento_codigo, "*SELECT* 1".tipodocumento_descricao, "*SELECT* 1".prevendas_codigo, "*SELECT* 1".contasareceber_avulsas_codigo, "*SELECT* 1".saidasnf_codigo, "*SELECT* 1".entidade_codigo, "*SELECT* 1".entidade, "*SELECT* 1".clientes_codigo, "*SELECT* 1".clientes_nome, "*SELECT* 1".valor, "*SELECT* 1".situacoescontas_codigo, "*SELECT* 1".situacao, "*SELECT* 1".gruposcontas_codigo, "*SELECT* 1".gruposcontas_descricao, "*SELECT* 1".statusconta_codigo, "*SELECT* 1".observacao, "*SELECT* 1".estornapagamento, "*SELECT* 1".aceitapagamento, "*SELECT* 1".estornaconta, "*SELECT* 1".vendedores_codigo, "*SELECT* 1".vendedores_nome, "*SELECT* 1".tecnicos_codigo, "*SELECT* 1".tecnicos_nome
5. 1.433 2,684.275 ↑ 39,608,971.9 50 1

Hash Join (cost=299,086.45..500,592,815.57 rows=1,980,448,594 width=658) (actual time=2,675.184..2,684.275 rows=50 loops=1)

  • Output: "*SELECT* 1_1".codigo, "*SELECT* 1_1".dhemissao, "*SELECT* 1_1".datavencimento, "*SELECT* 1_1".documento, "*SELECT* 1_1".prevendas_codigo, "*SELECT* 1_1".contasareceber_avulsas_codigo, "*SELECT* 1_1".saidasnf_codigo, NULL::boolean, "*SELECT* 1_1".clientes_codigo, "*SELECT* 1_1".valor, NULL::integer, NULL::numeric(13,3), NULL::numeric(13,3), sc.codigo, sc.descricao, NULL::boolean, "*SELECT* 1_1".observacao, "*SELECT* 1_1".gruposcontas_codigo, NULL::text, NULL::integer, NULL::integer, grct.descricao, "*SELECT* 1_1".entidade_codigo, "*SELECT* 1_1".entidade, NULL::boolean, sc.estornaconta, sc.estornapagamento, sc.aceitapagamento, "*SELECT* 1_1".tipodocumento_codigo, t.descricao, NULL::timestamp(0) without time zone, NULL::boolean, NULL::integer, obter_statusconta(sc.codigo, "*SELECT* 1_1".datavencimento, CURRENT_DATE), c.nome, pv.vendedores_codigo, pv.vendedores_nome, pv.tecnicos_codigo, pv.tecnicos_nome
  • Inner Unique: true
  • Hash Cond: ("*SELECT* 1_1".prevendas_codigo = pv.codigo)
6. 0.080 1,257.939 ↑ 4,292.9 191 1

Hash Left Join (cost=127,916.15..253,858.33 rows=819,941 width=434) (actual time=1,249.925..1,257.939 rows=191 loops=1)

  • Output: "*SELECT* 1_1".codigo, "*SELECT* 1_1".dhemissao, "*SELECT* 1_1".datavencimento, "*SELECT* 1_1".documento, "*SELECT* 1_1".prevendas_codigo, "*SELECT* 1_1".contasareceber_avulsas_codigo, "*SELECT* 1_1".saidasnf_codigo, "*SELECT* 1_1".clientes_codigo, "*SELECT* 1_1".valor, "*SELECT* 1_1".observacao, "*SELECT* 1_1".gruposcontas_codigo, "*SELECT* 1_1".entidade_codigo, "*SELECT* 1_1".entidade, "*SELECT* 1_1".tipodocumento_codigo, c.nome, sc.codigo, sc.descricao, sc.estornaconta, sc.estornapagamento, sc.aceitapagamento, grct.descricao, t.descricao
  • Inner Unique: true
  • Hash Cond: ("*SELECT* 1_1".tipodocumento_codigo = t.codigo)
7. 0.057 1,257.841 ↑ 4,292.9 191 1

Hash Left Join (cost=127,914.68..251,658.90 rows=819,941 width=356) (actual time=1,249.901..1,257.841 rows=191 loops=1)

  • Output: "*SELECT* 1_1".codigo, "*SELECT* 1_1".dhemissao, "*SELECT* 1_1".datavencimento, "*SELECT* 1_1".documento, "*SELECT* 1_1".prevendas_codigo, "*SELECT* 1_1".contasareceber_avulsas_codigo, "*SELECT* 1_1".saidasnf_codigo, "*SELECT* 1_1".clientes_codigo, "*SELECT* 1_1".valor, "*SELECT* 1_1".observacao, "*SELECT* 1_1".gruposcontas_codigo, "*SELECT* 1_1".entidade_codigo, "*SELECT* 1_1".entidade, "*SELECT* 1_1".tipodocumento_codigo, c.nome, sc.codigo, sc.descricao, sc.estornaconta, sc.estornapagamento, sc.aceitapagamento, grct.descricao
  • Inner Unique: true
  • Hash Cond: ("*SELECT* 1_1".gruposcontas_codigo = grct.codigo)
8. 0.090 1,257.778 ↑ 4,292.9 191 1

Hash Left Join (cost=127,894.78..249,465.92 rows=819,941 width=238) (actual time=1,249.890..1,257.778 rows=191 loops=1)

  • Output: "*SELECT* 1_1".codigo, "*SELECT* 1_1".dhemissao, "*SELECT* 1_1".datavencimento, "*SELECT* 1_1".documento, "*SELECT* 1_1".prevendas_codigo, "*SELECT* 1_1".contasareceber_avulsas_codigo, "*SELECT* 1_1".saidasnf_codigo, "*SELECT* 1_1".clientes_codigo, "*SELECT* 1_1".valor, "*SELECT* 1_1".observacao, "*SELECT* 1_1".gruposcontas_codigo, "*SELECT* 1_1".entidade_codigo, "*SELECT* 1_1".entidade, "*SELECT* 1_1".tipodocumento_codigo, c.nome, sc.codigo, sc.descricao, sc.estornaconta, sc.estornapagamento, sc.aceitapagamento
  • Inner Unique: true
  • Hash Cond: (cr_sit.situacoesconta_codigo = sc.codigo)
9. 0.153 1,257.662 ↑ 4,292.9 191 1

Hash Join (cost=127,875.11..247,272.68 rows=819,941 width=117) (actual time=1,249.852..1,257.662 rows=191 loops=1)

  • Output: "*SELECT* 1_1".codigo, "*SELECT* 1_1".dhemissao, "*SELECT* 1_1".datavencimento, "*SELECT* 1_1".documento, "*SELECT* 1_1".prevendas_codigo, "*SELECT* 1_1".contasareceber_avulsas_codigo, "*SELECT* 1_1".saidasnf_codigo, "*SELECT* 1_1".clientes_codigo, "*SELECT* 1_1".valor, "*SELECT* 1_1".observacao, "*SELECT* 1_1".gruposcontas_codigo, "*SELECT* 1_1".entidade_codigo, "*SELECT* 1_1".entidade, "*SELECT* 1_1".tipodocumento_codigo, c.nome, cr_sit.situacoesconta_codigo
  • Inner Unique: true
  • Hash Cond: ("*SELECT* 1_1".clientes_codigo = c.codigo)
10. 0.455 1,222.233 ↑ 4,293.2 191 1

Hash Left Join (cost=126,546.57..243,791.03 rows=819,997 width=91) (actual time=1,214.523..1,222.233 rows=191 loops=1)

  • Output: "*SELECT* 1_1".codigo, "*SELECT* 1_1".dhemissao, "*SELECT* 1_1".datavencimento, "*SELECT* 1_1".documento, "*SELECT* 1_1".prevendas_codigo, "*SELECT* 1_1".contasareceber_avulsas_codigo, "*SELECT* 1_1".saidasnf_codigo, "*SELECT* 1_1".clientes_codigo, "*SELECT* 1_1".valor, "*SELECT* 1_1".observacao, "*SELECT* 1_1".gruposcontas_codigo, "*SELECT* 1_1".entidade_codigo, "*SELECT* 1_1".entidade, "*SELECT* 1_1".tipodocumento_codigo, cr_sit.situacoesconta_codigo
  • Inner Unique: true
  • Hash Cond: ("*SELECT* 1_1".codigo = cr_sit.contasareceber_codigo)
11. 0.475 1,056.635 ↑ 4,293.2 191 1

Hash Join (cost=101,262.71..190,728.67 rows=819,997 width=87) (actual time=1,049.026..1,056.635 rows=191 loops=1)

  • Output: "*SELECT* 1_1".codigo, "*SELECT* 1_1".dhemissao, "*SELECT* 1_1".datavencimento, "*SELECT* 1_1".documento, "*SELECT* 1_1".prevendas_codigo, "*SELECT* 1_1".contasareceber_avulsas_codigo, "*SELECT* 1_1".saidasnf_codigo, "*SELECT* 1_1".clientes_codigo, "*SELECT* 1_1".valor, "*SELECT* 1_1".observacao, "*SELECT* 1_1".gruposcontas_codigo, "*SELECT* 1_1".entidade_codigo, "*SELECT* 1_1".entidade, "*SELECT* 1_1".tipodocumento_codigo
  • Inner Unique: true
  • Hash Cond: ("*SELECT* 1_1".codigo = cr_fat.contasareceber_codigo)
12. 0.016 770.179 ↑ 4,293.2 191 1

Append (cost=74,385.65..136,073.10 rows=819,997 width=87) (actual time=762.661..770.179 rows=191 loops=1)

13. 0.037 770.163 ↑ 4,293.2 191 1

Subquery Scan on *SELECT* 1_1 (cost=74,385.65..131,973.12 rows=819,997 width=87) (actual time=762.660..770.163 rows=191 loops=1)

  • Output: "*SELECT* 1_1".codigo, "*SELECT* 1_1".dhemissao, "*SELECT* 1_1".datavencimento, "*SELECT* 1_1".documento, "*SELECT* 1_1".prevendas_codigo, "*SELECT* 1_1".contasareceber_avulsas_codigo, "*SELECT* 1_1".saidasnf_codigo, "*SELECT* 1_1".clientes_codigo, "*SELECT* 1_1".valor, "*SELECT* 1_1".observacao, "*SELECT* 1_1".gruposcontas_codigo, "*SELECT* 1_1".entidade_codigo, "*SELECT* 1_1".entidade, "*SELECT* 1_1".tipodocumento_codigo
14. 1.164 770.126 ↑ 4,293.2 191 1

Hash Join (cost=74,385.65..123,773.15 rows=819,997 width=168) (actual time=762.659..770.126 rows=191 loops=1)

  • Output: cr.codigo, cr.dhemissao, cr.datavencimento, cr.documento, pvpg.codprevenda, NULL::integer, NULL::integer, NULL::boolean, pv_1.codcliente, cr.valor, NULL::integer, NULL::numeric(13,3), NULL::numeric(13,3), cr.observacao, cr.gruposcontas_codigo, NULL::text, NULL::integer, NULL::integer, pvpg.codprevenda, 'Pré-venda'::text, cr.tipodocumento_codigo, NULL::integer
  • Inner Unique: true
  • Hash Cond: (pvpg_cr.contasareceber_codigo = cr.codigo)
15. 2.254 357.348 ↑ 4,141.4 198 1

Hash Join (cost=40,879.79..73,699.79 rows=819,997 width=12) (actual time=350.815..357.348 rows=198 loops=1)

  • Output: pvpg_cr.contasareceber_codigo, pvpg.codprevenda, pv_1.codcliente
  • Inner Unique: true
  • Hash Cond: (pvpg.codprevenda = pv_1.codigo)
16. 4.531 167.633 ↑ 522.6 1,569 1

Hash Join (cost=16,639.69..39,012.18 rows=819,997 width=8) (actual time=161.856..167.633 rows=1,569 loops=1)

  • Output: pvpg_cr.contasareceber_codigo, pvpg.codprevenda
  • Inner Unique: true
  • Hash Cond: (pvpg_cr.prevendas_pagtos_codigo = pvpg.codigo)
17. 1.603 1.603 ↑ 64.3 12,755 1

Seq Scan on public.prevendas_pagtos_contasareceber pvpg_cr (cost=0.00..11,828.97 rows=819,997 width=8) (actual time=0.017..1.603 rows=12,755 loops=1)

  • Output: pvpg_cr.contasareceber_codigo, pvpg_cr.prevendas_pagtos_codigo
18. 81.207 161.499 ↑ 1.0 507,453 1

Hash (cost=8,313.53..8,313.53 rows=507,453 width=8) (actual time=161.499..161.499 rows=507,453 loops=1)

  • Output: pvpg.codprevenda, pvpg.codigo
  • Buckets: 131072 Batches: 8 Memory Usage: 3498kB
19. 80.292 80.292 ↑ 1.0 507,453 1

Seq Scan on public.prevenda_pagto pvpg (cost=0.00..8,313.53 rows=507,453 width=8) (actual time=0.011..80.292 rows=507,453 loops=1)

  • Output: pvpg.codprevenda, pvpg.codigo
  • Filter: (pvpg.codprevenda IS NOT NULL)
20. 78.791 187.461 ↑ 1.0 483,071 1

Hash (cost=16,314.71..16,314.71 rows=483,071 width=8) (actual time=187.460..187.461 rows=483,071 loops=1)

  • Output: pv_1.codcliente, pv_1.codigo
  • Buckets: 131072 Batches: 8 Memory Usage: 3385kB
21. 108.670 108.670 ↑ 1.0 483,071 1

Seq Scan on public.prevendas pv_1 (cost=0.00..16,314.71 rows=483,071 width=8) (actual time=0.032..108.670 rows=483,071 loops=1)

  • Output: pv_1.codcliente, pv_1.codigo
22. 205.405 411.614 ↑ 1.0 820,038 1

Hash (cost=16,848.38..16,848.38 rows=820,038 width=35) (actual time=411.614..411.614 rows=820,038 loops=1)

  • Output: cr.codigo, cr.dhemissao, cr.datavencimento, cr.documento, cr.valor, cr.observacao, cr.gruposcontas_codigo, cr.tipodocumento_codigo
  • Buckets: 65536 Batches: 32 Memory Usage: 2160kB
23. 206.209 206.209 ↑ 1.0 820,038 1

Seq Scan on public.contasareceber cr (cost=0.00..16,848.38 rows=820,038 width=35) (actual time=0.033..206.209 rows=820,038 loops=1)

  • Output: cr.codigo, cr.dhemissao, cr.datavencimento, cr.documento, cr.valor, cr.observacao, cr.gruposcontas_codigo, cr.tipodocumento_codigo
24. 135.199 285.981 ↑ 1.0 820,003 1

Hash (cost=13,423.03..13,423.03 rows=820,003 width=4) (actual time=285.981..285.981 rows=820,003 loops=1)

  • Output: cr_fat.contasareceber_codigo
  • Buckets: 131072 Batches: 16 Memory Usage: 2832kB
25. 150.782 150.782 ↑ 1.0 820,003 1

Seq Scan on public.contasareceber_faturamentos cr_fat (cost=0.00..13,423.03 rows=820,003 width=4) (actual time=0.069..150.782 rows=820,003 loops=1)

  • Output: cr_fat.contasareceber_codigo
  • Filter: (cr_fat.contasareceber_codigo IS NOT NULL)
26. 105.772 165.143 ↑ 1.0 820,038 1

Hash (cost=11,829.38..11,829.38 rows=820,038 width=8) (actual time=165.142..165.143 rows=820,038 loops=1)

  • Output: cr_sit.contasareceber_codigo, cr_sit.situacoesconta_codigo
  • Buckets: 131072 Batches: 16 Memory Usage: 3033kB
27. 59.371 59.371 ↑ 1.0 820,038 1

Seq Scan on public.contasareceber_situacao cr_sit (cost=0.00..11,829.38 rows=820,038 width=8) (actual time=0.015..59.371 rows=820,038 loops=1)

  • Output: cr_sit.contasareceber_codigo, cr_sit.situacoesconta_codigo
28. 2.709 35.276 ↓ 1.0 14,622 1

Hash (cost=1,145.78..1,145.78 rows=14,621 width=30) (actual time=35.276..35.276 rows=14,622 loops=1)

  • Output: c.nome, c.codigo
  • Buckets: 16384 Batches: 1 Memory Usage: 1036kB
29. 32.567 32.567 ↓ 1.0 14,622 1

Seq Scan on public.clientes c (cost=0.00..1,145.78 rows=14,621 width=30) (actual time=0.029..32.567 rows=14,622 loops=1)

  • Output: c.nome, c.codigo
  • Filter: ((c.nome)::text ~~* '%'::text)
30. 0.013 0.026 ↑ 71.7 6 1

Hash (cost=14.30..14.30 rows=430 width=125) (actual time=0.026..0.026 rows=6 loops=1)

  • Output: sc.codigo, sc.descricao, sc.estornaconta, sc.estornapagamento, sc.aceitapagamento
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
31. 0.013 0.013 ↑ 71.7 6 1

Seq Scan on public.situacoescontas sc (cost=0.00..14.30 rows=430 width=125) (actual time=0.012..0.013 rows=6 loops=1)

  • Output: sc.codigo, sc.descricao, sc.estornaconta, sc.estornapagamento, sc.aceitapagamento
32. 0.000 0.006 ↓ 0.0 0 1

Hash (cost=14.40..14.40 rows=440 width=122) (actual time=0.006..0.006 rows=0 loops=1)

  • Output: grct.descricao, grct.codigo
  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
33. 0.006 0.006 ↓ 0.0 0 1

Seq Scan on public.gruposcontas grct (cost=0.00..14.40 rows=440 width=122) (actual time=0.006..0.006 rows=0 loops=1)

  • Output: grct.descricao, grct.codigo
34. 0.009 0.018 ↓ 1.0 22 1

Hash (cost=1.21..1.21 rows=21 width=82) (actual time=0.018..0.018 rows=22 loops=1)

  • Output: t.descricao, t.codigo
  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
35. 0.009 0.009 ↓ 1.0 22 1

Seq Scan on public.tipodocumento t (cost=0.00..1.21 rows=21 width=82) (actual time=0.006..0.009 rows=22 loops=1)

  • Output: t.descricao, t.codigo
36. 183.333 1,424.903 ↑ 1.0 483,071 1

Hash (cost=155,696.91..155,696.91 rows=483,071 width=132) (actual time=1,424.903..1,424.903 rows=483,071 loops=1)

  • Output: pv.vendedores_codigo, pv.vendedores_nome, pv.tecnicos_codigo, pv.tecnicos_nome, pv.codigo
  • Buckets: 32768 Batches: 32 Memory Usage: 2523kB
37. 59.500 1,241.570 ↑ 1.0 483,071 1

Subquery Scan on pv (cost=133,958.72..155,696.91 rows=483,071 width=132) (actual time=506.051..1,241.570 rows=483,071 loops=1)

  • Output: pv.vendedores_codigo, pv.vendedores_nome, pv.tecnicos_codigo, pv.tecnicos_nome, pv.codigo
38. 591.600 1,182.070 ↑ 1.0 483,071 1

GroupAggregate (cost=133,958.72..150,866.20 rows=483,071 width=132) (actual time=506.050..1,182.070 rows=483,071 loops=1)

  • Output: prevendas.codigo, array_agg(prevendas.codvendedor), array_agg(vend.nome), array_agg(prevendas.codtecnico), array_agg(tec.nome)
  • Group Key: prevendas.codigo
39. 263.512 590.470 ↑ 1.0 483,071 1

Sort (cost=133,958.72..135,166.39 rows=483,071 width=139) (actual time=506.026..590.470 rows=483,071 loops=1)

  • Output: prevendas.codigo, prevendas.codvendedor, vend.nome, prevendas.codtecnico, tec.nome
  • Sort Key: prevendas.codigo
  • Sort Method: external merge Disk: 12784kB
40. 70.312 326.958 ↑ 1.0 483,071 1

Hash Left Join (cost=14.68..19,003.28 rows=483,071 width=139) (actual time=0.121..326.958 rows=483,071 loops=1)

  • Output: prevendas.codigo, prevendas.codvendedor, vend.nome, prevendas.codtecnico, tec.nome
  • Inner Unique: true
  • Hash Cond: (prevendas.codtecnico = tec.codigo)
41. 178.081 256.640 ↑ 1.0 483,071 1

Hash Left Join (cost=2.88..17,723.42 rows=483,071 width=21) (actual time=0.057..256.640 rows=483,071 loops=1)

  • Output: prevendas.codigo, prevendas.codvendedor, prevendas.codtecnico, vend.nome
  • Inner Unique: true
  • Hash Cond: (prevendas.codvendedor = vend.codigo)
42. 78.536 78.536 ↑ 1.0 483,071 1

Seq Scan on public.prevendas (cost=0.00..16,314.71 rows=483,071 width=12) (actual time=0.027..78.536 rows=483,071 loops=1)

  • Output: prevendas.codigo, prevendas.codorcamento, prevendas.codcliente, prevendas.denomcliente, prevendas.nomecliente, prevendas.endcliente, prevendas.baircliente, prevendas.codmunicipiocliente, prevendas.cepcliente, prevendas.fonecliente, prevendas.cpfcnpjcliente, prevendas.rgiecliente, prevendas.qtdetotal, prevendas.observacao, prevendas.codvendedor, prevendas.datavenda, prevendas.desconto, prevendas.horavenda, prevendas.codtecnico, prevendas.entrega, prevendas.acrescimo, prevendas.valortotal, prevendas.valortotalprod, prevendas.codpagamento, prevendas.endnumcliente, prevendas.fatorprecocliente, prevendas.fatorprecopagto, prevendas.comissaovendedor, prevendas.comissaotecnico, prevendas.codextpedido, prevendas.cod_os, prevendas.complcliente, prevendas.ddicliente, prevendas.dddcliente, prevendas.ramalcliente, prevendas.fatorcomissao
43. 0.010 0.023 ↑ 1.0 39 1

Hash (cost=2.39..2.39 rows=39 width=13) (actual time=0.023..0.023 rows=39 loops=1)

  • Output: vend.nome, vend.codigo
  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
44. 0.013 0.013 ↑ 1.0 39 1

Seq Scan on public.vendedores vend (cost=0.00..2.39 rows=39 width=13) (actual time=0.006..0.013 rows=39 loops=1)

  • Output: vend.nome, vend.codigo
45. 0.000 0.006 ↓ 0.0 0 1

Hash (cost=10.80..10.80 rows=80 width=122) (actual time=0.006..0.006 rows=0 loops=1)

  • Output: tec.nome, tec.codigo
  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
46. 0.006 0.006 ↓ 0.0 0 1

Seq Scan on public.tecnicos tec (cost=0.00..10.80 rows=80 width=122) (actual time=0.006..0.006 rows=0 loops=1)

  • Output: tec.nome, tec.codigo
47. 0.000 0.000 ↓ 0.0 0

Subquery Scan on *SELECT* 2 (cost=85,346.10..992,985.34 rows=3,215,686 width=566) (never executed)

  • Output: "*SELECT* 2".codigo, "*SELECT* 2".dhemissao, "*SELECT* 2".datavencimento, "*SELECT* 2".documento, "*SELECT* 2".tipodocumento_codigo, "*SELECT* 2".tipodocumento_descricao, "*SELECT* 2".prevendas_codigo, "*SELECT* 2".contasareceber_avulsas_codigo, "*SELECT* 2".saidasnf_codigo, "*SELECT* 2".entidade_codigo, "*SELECT* 2".entidade, "*SELECT* 2".clientes_codigo, "*SELECT* 2".clientes_nome, "*SELECT* 2".valor, "*SELECT* 2".situacoescontas_codigo, "*SELECT* 2".situacao, "*SELECT* 2".gruposcontas_codigo, "*SELECT* 2".gruposcontas_descricao, "*SELECT* 2".statusconta_codigo, "*SELECT* 2".observacao, "*SELECT* 2".estornapagamento, "*SELECT* 2".aceitapagamento, "*SELECT* 2".estornaconta, "*SELECT* 2".vendedores_codigo, "*SELECT* 2".vendedores_nome, "*SELECT* 2".tecnicos_codigo, "*SELECT* 2".tecnicos_nome
48. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=85,346.10..960,828.48 rows=3,215,686 width=658) (never executed)

  • Output: "*SELECT* 2_1".codigo, "*SELECT* 2_1".dhemissao, "*SELECT* 2_1".datavencimento, "*SELECT* 2_1".documento, "*SELECT* 2_1".prevendas_codigo, "*SELECT* 2_1".contasareceber_avulsas_codigo, "*SELECT* 2_1".saidasnf_codigo, NULL::boolean, "*SELECT* 2_1".clientes_codigo, "*SELECT* 2_1".valor, NULL::integer, NULL::numeric(13,3), NULL::numeric(13,3), sc_1.codigo, sc_1.descricao, NULL::boolean, "*SELECT* 2_1".observacao, "*SELECT* 2_1".gruposcontas_codigo, NULL::text, NULL::integer, NULL::integer, grct_1.descricao, "*SELECT* 2_1".entidade_codigo, "*SELECT* 2_1".entidade, NULL::boolean, sc_1.estornaconta, sc_1.estornapagamento, sc_1.aceitapagamento, "*SELECT* 2_1".tipodocumento_codigo, t_1.descricao, NULL::timestamp(0) without time zone, NULL::boolean, NULL::integer, obter_statusconta(sc_1.codigo, "*SELECT* 2_1".datavencimento, CURRENT_DATE), c_1.nome, snf.vendedores_codigo, snf.vendedores_nome, snf.tecnicos_codigo, snf.tecnicos_nome
  • Inner Unique: true
  • Hash Cond: ("*SELECT* 2_1".saidasnf_codigo = snf.codigo)
49. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=1,332.43..59,031.04 rows=2,260 width=434) (never executed)

  • Output: "*SELECT* 2_1".codigo, "*SELECT* 2_1".dhemissao, "*SELECT* 2_1".datavencimento, "*SELECT* 2_1".documento, "*SELECT* 2_1".prevendas_codigo, "*SELECT* 2_1".contasareceber_avulsas_codigo, "*SELECT* 2_1".saidasnf_codigo, "*SELECT* 2_1".clientes_codigo, "*SELECT* 2_1".valor, "*SELECT* 2_1".observacao, "*SELECT* 2_1".gruposcontas_codigo, "*SELECT* 2_1".entidade_codigo, "*SELECT* 2_1".entidade, "*SELECT* 2_1".tipodocumento_codigo, c_1.nome, sc_1.codigo, sc_1.descricao, sc_1.estornaconta, sc_1.estornapagamento, sc_1.aceitapagamento, grct_1.descricao, t_1.descricao
  • Inner Unique: true
  • Hash Cond: ("*SELECT* 2_1".tipodocumento_codigo = t_1.codigo)
50. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=1,330.95..59,023.51 rows=2,260 width=356) (never executed)

  • Output: "*SELECT* 2_1".codigo, "*SELECT* 2_1".dhemissao, "*SELECT* 2_1".datavencimento, "*SELECT* 2_1".documento, "*SELECT* 2_1".prevendas_codigo, "*SELECT* 2_1".contasareceber_avulsas_codigo, "*SELECT* 2_1".saidasnf_codigo, "*SELECT* 2_1".clientes_codigo, "*SELECT* 2_1".valor, "*SELECT* 2_1".observacao, "*SELECT* 2_1".gruposcontas_codigo, "*SELECT* 2_1".entidade_codigo, "*SELECT* 2_1".entidade, "*SELECT* 2_1".tipodocumento_codigo, c_1.nome, sc_1.codigo, sc_1.descricao, sc_1.estornaconta, sc_1.estornapagamento, sc_1.aceitapagamento, grct_1.descricao
  • Inner Unique: true
51. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=1,330.81..58,606.79 rows=2,260 width=238) (never executed)

  • Output: "*SELECT* 2_1".codigo, "*SELECT* 2_1".dhemissao, "*SELECT* 2_1".datavencimento, "*SELECT* 2_1".documento, "*SELECT* 2_1".prevendas_codigo, "*SELECT* 2_1".contasareceber_avulsas_codigo, "*SELECT* 2_1".saidasnf_codigo, "*SELECT* 2_1".clientes_codigo, "*SELECT* 2_1".valor, "*SELECT* 2_1".observacao, "*SELECT* 2_1".gruposcontas_codigo, "*SELECT* 2_1".entidade_codigo, "*SELECT* 2_1".entidade, "*SELECT* 2_1".tipodocumento_codigo, c_1.nome, sc_1.codigo, sc_1.descricao, sc_1.estornaconta, sc_1.estornapagamento, sc_1.aceitapagamento
  • Inner Unique: true
52. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=1,330.66..58,233.85 rows=2,260 width=117) (never executed)

  • Output: "*SELECT* 2_1".codigo, "*SELECT* 2_1".dhemissao, "*SELECT* 2_1".datavencimento, "*SELECT* 2_1".documento, "*SELECT* 2_1".prevendas_codigo, "*SELECT* 2_1".contasareceber_avulsas_codigo, "*SELECT* 2_1".saidasnf_codigo, "*SELECT* 2_1".clientes_codigo, "*SELECT* 2_1".valor, "*SELECT* 2_1".observacao, "*SELECT* 2_1".gruposcontas_codigo, "*SELECT* 2_1".entidade_codigo, "*SELECT* 2_1".entidade, "*SELECT* 2_1".tipodocumento_codigo, c_1.nome, cr_sit_1.situacoesconta_codigo
  • Inner Unique: true
53. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=1,330.23..43,797.80 rows=2,260 width=113) (never executed)

  • Output: "*SELECT* 2_1".codigo, "*SELECT* 2_1".dhemissao, "*SELECT* 2_1".datavencimento, "*SELECT* 2_1".documento, "*SELECT* 2_1".prevendas_codigo, "*SELECT* 2_1".contasareceber_avulsas_codigo, "*SELECT* 2_1".saidasnf_codigo, "*SELECT* 2_1".clientes_codigo, "*SELECT* 2_1".valor, "*SELECT* 2_1".observacao, "*SELECT* 2_1".gruposcontas_codigo, "*SELECT* 2_1".entidade_codigo, "*SELECT* 2_1".entidade, "*SELECT* 2_1".tipodocumento_codigo, c_1.nome
  • Inner Unique: true
  • Hash Cond: ("*SELECT* 2_1".clientes_codigo = c_1.codigo)
54. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.70..42,463.33 rows=2,260 width=87) (never executed)

  • Output: "*SELECT* 2_1".codigo, "*SELECT* 2_1".dhemissao, "*SELECT* 2_1".datavencimento, "*SELECT* 2_1".documento, "*SELECT* 2_1".prevendas_codigo, "*SELECT* 2_1".contasareceber_avulsas_codigo, "*SELECT* 2_1".saidasnf_codigo, "*SELECT* 2_1".clientes_codigo, "*SELECT* 2_1".valor, "*SELECT* 2_1".observacao, "*SELECT* 2_1".gruposcontas_codigo, "*SELECT* 2_1".entidade_codigo, "*SELECT* 2_1".entidade, "*SELECT* 2_1".tipodocumento_codigo
  • Inner Unique: true
55. 0.000 0.000 ↓ 0.0 0

Append (cost=1.27..27,493.63 rows=2,260 width=87) (never executed)

56. 0.000 0.000 ↓ 0.0 0

Subquery Scan on *SELECT* 2_1 (cost=1.27..27,482.33 rows=2,260 width=87) (never executed)

  • Output: "*SELECT* 2_1".codigo, "*SELECT* 2_1".dhemissao, "*SELECT* 2_1".datavencimento, "*SELECT* 2_1".documento, "*SELECT* 2_1".prevendas_codigo, "*SELECT* 2_1".contasareceber_avulsas_codigo, "*SELECT* 2_1".saidasnf_codigo, "*SELECT* 2_1".clientes_codigo, "*SELECT* 2_1".valor, "*SELECT* 2_1".observacao, "*SELECT* 2_1".gruposcontas_codigo, "*SELECT* 2_1".entidade_codigo, "*SELECT* 2_1".entidade, "*SELECT* 2_1".tipodocumento_codigo
57. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.27..27,459.73 rows=2,260 width=168) (never executed)

  • Output: cr_1.codigo, cr_1.dhemissao, cr_1.datavencimento, cr_1.documento, NULL::integer, NULL::integer, snfpg.codsaidasnf, NULL::boolean, snf_1.codcliente, cr_1.valor, NULL::integer, NULL::numeric(13,3), NULL::numeric(13,3), cr_1.observacao, cr_1.gruposcontas_codigo, NULL::text, NULL::integer, NULL::integer, snfpg.codsaidasnf, 'Nota de Saída'::text, cr_1.tipodocumento_codigo, NULL::integer
  • Inner Unique: true
58. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.85..26,091.05 rows=2,260 width=39) (never executed)

  • Output: cr_1.codigo, cr_1.dhemissao, cr_1.datavencimento, cr_1.documento, cr_1.valor, cr_1.observacao, cr_1.gruposcontas_codigo, cr_1.tipodocumento_codigo, snfpg.codsaidasnf
  • Inner Unique: true
59. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.42..16,180.65 rows=2,260 width=39) (never executed)

  • Output: cr_1.codigo, cr_1.dhemissao, cr_1.datavencimento, cr_1.documento, cr_1.valor, cr_1.observacao, cr_1.gruposcontas_codigo, cr_1.tipodocumento_codigo, snfpg_cr.saidasnf_pagtos_codigo
  • Inner Unique: true
60. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.saidasnf_pagtos_contasareceber snfpg_cr (cost=0.00..32.60 rows=2,260 width=8) (never executed)

  • Output: snfpg_cr.saidasnf_pagtos_codigo, snfpg_cr.contasareceber_codigo
61. 0.000 0.000 ↓ 0.0 0

Index Scan using contasareceber_pkey1 on public.contasareceber cr_1 (cost=0.42..7.15 rows=1 width=35) (never executed)

  • Output: cr_1.codigo, cr_1.dhemissao, cr_1.datavencimento, cr_1.valor, cr_1.diascarencia, cr_1.multapercent, cr_1.jurosdiapercent, cr_1.documento, cr_1.observacao, cr_1.tipodocumento_codigo, cr_1.gruposcontas_codigo, cr_1.parcela
  • Index Cond: (cr_1.codigo = snfpg_cr.contasareceber_codigo)
62. 0.000 0.000 ↓ 0.0 0

Index Scan using saidasnf_pagto_pkey on public.saidasnf_pagto snfpg (cost=0.42..4.39 rows=1 width=8) (never executed)

  • Output: snfpg.codigo, snfpg.codsaidasnf, snfpg.codformapagtofinalizadora, snfpg.qtdeparcelas, snfpg.valor, snfpg.comissao
  • Index Cond: (snfpg.codigo = snfpg_cr.saidasnf_pagtos_codigo)
  • Filter: (snfpg.codsaidasnf IS NOT NULL)
63. 0.000 0.000 ↓ 0.0 0

Index Scan using saidasnf_codigo_index on public.saidasnf snf_1 (cost=0.42..0.61 rows=1 width=8) (never executed)

  • Output: snf_1.codigo, snf_1.modelo, snf_1.serie, snf_1.numero, snf_1.codprevenda, snf_1.dataemissao, snf_1.datasaida, snf_1.codcliente, snf_1.denomcliente, snf_1.nomecliente, snf_1.endcliente, snf_1.baircliente, snf_1.codmunicipiocliente, snf_1.cepcliente, snf_1.fonecliente, snf_1.cpfcnpjcliente, snf_1.rgiecliente, snf_1.baseicms, snf_1.valoricms, snf_1.baseicmssub, snf_1.valoricmssub, snf_1.valortotalprod, snf_1.valorfrete, snf_1.valorseguro, snf_1.outrasdespesas, snf_1.valortotalipi, snf_1.valortotalnota, snf_1.codtransportadora, snf_1.placaveiculo, snf_1.qtdetotal, snf_1.observacao, snf_1.operacao, snf_1.codvendedor, snf_1.datavenda, snf_1.numaidf, snf_1.anoaidf, snf_1.despesaacessoria, snf_1.desconto, snf_1.horavenda, snf_1.codtecnico, snf_1.entrega, snf_1.cupomfiscal, snf_1.pdv, snf_1.fechada, snf_1.acrescimo, snf_1.ufplaca, snf_1.horasaida, snf_1.pagafrete, snf_1.qtdevolume, snf_1.especievolume, snf_1.marcavolume, snf_1.numerovolume, snf_1.pesobruto, snf_1.pesoliquido, snf_1.codpagamento, snf_1.cupomprevenda, snf_1.endnumerocliente, snf_1.complcliente, snf_1.situacao, snf_1.finalidadeemissao, snf_1.isufcliente, snf_1.emailcliente, snf_1.clientesubstituto, snf_1.pis, snf_1.cofins, snf_1.issservico, snf_1.issbase, snf_1.issvalor, snf_1.isspis, snf_1.isscofins, snf_1.retpis, snf_1.retcofins, snf_1.retcsll, snf_1.baseirrf, snf_1.valorirrf, snf_1.retbaseprev, snf_1.retprev, snf_1.valorisento, snf_1.rtvserv, snf_1.rtvbcret, snf_1.rtpicmsret, snf_1.rtvicmsret, snf_1.rtcfop, snf_1.rtcmunfg, snf_1.cro, snf_1.chave, snf_1.rntcveiculo, snf_1.descontoprodutos, snf_1.infadfisco, snf_1.movimentaestoque, snf_1.horaemissao, snf_1.fatorprecocliente, snf_1.fatorprecopagto, snf_1.codusuario, snf_1.codorcamento, snf_1.cod_os, snf_1.codextpedido, snf_1.movimentacontrole, snf_1.comissaovendedor, snf_1.indiedest, snf_1.indfinal, snf_1.indpres, snf_1.ddicliente, snf_1.dddcliente, snf_1.ramalcliente, snf_1.comissaotecnico, snf_1.vfcp, snf_1.vfcpst, snf_1.vicmsdeson, snf_1.vipidevol, snf_1.iddest, snf_1.fatorcomissao
  • Index Cond: (snf_1.codigo = snfpg.codsaidasnf)
64. 0.000 0.000 ↓ 0.0 0

Index Only Scan using contasareceber_faturamentos_pkey on public.contasareceber_faturamentos cr_fat_1 (cost=0.42..6.62 rows=1 width=4) (never executed)

  • Output: cr_fat_1.contasareceber_codigo
  • Index Cond: ((cr_fat_1.contasareceber_codigo = "*SELECT* 2_1".codigo) AND (cr_fat_1.contasareceber_codigo IS NOT NULL))
  • Heap Fetches: 0
65. 0.000 0.000 ↓ 0.0 0

Hash (cost=1,145.78..1,145.78 rows=14,621 width=30) (never executed)

  • Output: c_1.nome, c_1.codigo
66. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.clientes c_1 (cost=0.00..1,145.78 rows=14,621 width=30) (never executed)

  • Output: c_1.nome, c_1.codigo
  • Filter: ((c_1.nome)::text ~~* '%'::text)
67. 0.000 0.000 ↓ 0.0 0

Index Scan using contasareceber_situacao_pkey on public.contasareceber_situacao cr_sit_1 (cost=0.42..6.39 rows=1 width=8) (never executed)

  • Output: cr_sit_1.contasareceber_codigo, cr_sit_1.situacoesconta_codigo
  • Index Cond: ("*SELECT* 2_1".codigo = cr_sit_1.contasareceber_codigo)
68. 0.000 0.000 ↓ 0.0 0

Index Scan using situacoescontas_pkey on public.situacoescontas sc_1 (cost=0.15..0.17 rows=1 width=125) (never executed)

  • Output: sc_1.codigo, sc_1.descricao, sc_1.editaconta, sc_1.estornaconta, sc_1.aceitapagamento, sc_1.estornapagamento, sc_1.observacao
  • Index Cond: (cr_sit_1.situacoesconta_codigo = sc_1.codigo)
69. 0.000 0.000 ↓ 0.0 0

Index Scan using gruposcontas_pkey on public.gruposcontas grct_1 (cost=0.15..0.18 rows=1 width=122) (never executed)

  • Output: grct_1.codigo, grct_1.descricao, grct_1.observacao
  • Index Cond: (grct_1.codigo = "*SELECT* 2_1".gruposcontas_codigo)
70. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.21..1.21 rows=21 width=82) (never executed)

  • Output: t_1.descricao, t_1.codigo
71. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.tipodocumento t_1 (cost=0.00..1.21 rows=21 width=82) (never executed)

  • Output: t_1.descricao, t_1.codigo
72. 0.000 0.000 ↓ 0.0 0

Hash (cost=74,897.50..74,897.50 rows=284,574 width=132) (never executed)

  • Output: snf.vendedores_codigo, snf.vendedores_nome, snf.tecnicos_codigo, snf.tecnicos_nome, snf.codigo
73. 0.000 0.000 ↓ 0.0 0

Subquery Scan on snf (cost=62,091.67..74,897.50 rows=284,574 width=132) (never executed)

  • Output: snf.vendedores_codigo, snf.vendedores_nome, snf.tecnicos_codigo, snf.tecnicos_nome, snf.codigo
74. 0.000 0.000 ↓ 0.0 0

GroupAggregate (cost=62,091.67..72,051.76 rows=284,574 width=132) (never executed)

  • Output: saidasnf.codigo, array_agg(saidasnf.codvendedor), array_agg(vend_1.nome), array_agg(saidasnf.codtecnico), array_agg(tec_1.nome)
  • Group Key: saidasnf.codigo
75. 0.000 0.000 ↓ 0.0 0

Sort (cost=62,091.67..62,803.11 rows=284,574 width=139) (never executed)

  • Output: saidasnf.codigo, saidasnf.codvendedor, vend_1.nome, saidasnf.codtecnico, tec_1.nome
  • Sort Key: saidasnf.codigo
76. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=14.68..15,885.48 rows=284,574 width=139) (never executed)

  • Output: saidasnf.codigo, saidasnf.codvendedor, vend_1.nome, saidasnf.codtecnico, tec_1.nome
  • Inner Unique: true
  • Hash Cond: (saidasnf.codtecnico = tec_1.codigo)
77. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=2.88..15,126.68 rows=284,574 width=21) (never executed)

  • Output: saidasnf.codigo, saidasnf.codvendedor, saidasnf.codtecnico, vend_1.nome
  • Inner Unique: true
  • Hash Cond: (saidasnf.codvendedor = vend_1.codigo)
78. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.saidasnf (cost=0.00..14,308.74 rows=284,574 width=12) (never executed)

  • Output: saidasnf.codigo, saidasnf.modelo, saidasnf.serie, saidasnf.numero, saidasnf.codprevenda, saidasnf.dataemissao, saidasnf.datasaida, saidasnf.codcliente, saidasnf.denomcliente, saidasnf.nomecliente, saidasnf.endcliente, saidasnf.baircliente, saidasnf.codmunicipiocliente, saidasnf.cepcliente, saidasnf.fonecliente, saidasnf.cpfcnpjcliente, saidasnf.rgiecliente, saidasnf.baseicms, saidasnf.valoricms, saidasnf.baseicmssub, saidasnf.valoricmssub, saidasnf.valortotalprod, saidasnf.valorfrete, saidasnf.valorseguro, saidasnf.outrasdespesas, saidasnf.valortotalipi, saidasnf.valortotalnota, saidasnf.codtransportadora, saidasnf.placaveiculo, saidasnf.qtdetotal, saidasnf.observacao, saidasnf.operacao, saidasnf.codvendedor, saidasnf.datavenda, saidasnf.numaidf, saidasnf.anoaidf, saidasnf.despesaacessoria, saidasnf.desconto, saidasnf.horavenda, saidasnf.codtecnico, saidasnf.entrega, saidasnf.cupomfiscal, saidasnf.pdv, saidasnf.fechada, saidasnf.acrescimo, saidasnf.ufplaca, saidasnf.horasaida, saidasnf.pagafrete, saidasnf.qtdevolume, saidasnf.especievolume, saidasnf.marcavolume, saidasnf.numerovolume, saidasnf.pesobruto, saidasnf.pesoliquido, saidasnf.codpagamento, saidasnf.cupomprevenda, saidasnf.endnumerocliente, saidasnf.complcliente, saidasnf.situacao, saidasnf.finalidadeemissao, saidasnf.isufcliente, saidasnf.emailcliente, saidasnf.clientesubstituto, saidasnf.pis, saidasnf.cofins, saidasnf.issservico, saidasnf.issbase, saidasnf.issvalor, saidasnf.isspis, saidasnf.isscofins, saidasnf.retpis, saidasnf.retcofins, saidasnf.retcsll, saidasnf.baseirrf, saidasnf.valorirrf, saidasnf.retbaseprev, saidasnf.retprev, saidasnf.valorisento, saidasnf.rtvserv, saidasnf.rtvbcret, saidasnf.rtpicmsret, saidasnf.rtvicmsret, saidasnf.rtcfop, saidasnf.rtcmunfg, saidasnf.cro, saidasnf.chave, saidasnf.rntcveiculo, saidasnf.descontoprodutos, saidasnf.infadfisco, saidasnf.movimentaestoque, saidasnf.horaemissao, saidasnf.fatorprecocliente, saidasnf.fatorprecopagto, saidasnf.codusuario, saidasnf.codorcamento, saidasnf.cod_os, saidasnf.codextpedido, saidasnf.movimentacontrole, saidasnf.comissaovendedor, saidasnf.indiedest, saidasnf.indfinal, saidasnf.indpres, saidasnf.ddicliente, saidasnf.dddcliente, saidasnf.ramalcliente, saidasnf.comissaotecnico, saidasnf.vfcp, saidasnf.vfcpst, saidasnf.vicmsdeson, saidasnf.vipidevol, saidasnf.iddest, saidasnf.fatorcomissao
79. 0.000 0.000 ↓ 0.0 0

Hash (cost=2.39..2.39 rows=39 width=13) (never executed)

  • Output: vend_1.nome, vend_1.codigo
80. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.vendedores vend_1 (cost=0.00..2.39 rows=39 width=13) (never executed)

  • Output: vend_1.nome, vend_1.codigo
81. 0.000 0.000 ↓ 0.0 0

Hash (cost=10.80..10.80 rows=80 width=122) (never executed)

  • Output: tec_1.nome, tec_1.codigo
82. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.tecnicos tec_1 (cost=0.00..10.80 rows=80 width=122) (never executed)

  • Output: tec_1.nome, tec_1.codigo
83. 0.300 0.300 ↑ 1.0 1 50

Index Scan using contasareceber_pagtos_contasareceber_faturamentos_cr_codigo_idx on public.contasareceber_pagtos crpg (cost=0.42..0.44 rows=1 width=12) (actual time=0.005..0.006 rows=1 loops=50)

  • Output: crpg.codigo, crpg.contasareceber_faturamentos_cr_codigo, crpg.usuarios_codigo, crpg.dhpagamento, crpg.diasjurosdevido, crpg.valorprincipaldevido, crpg.valormultadevido, crpg.valorjurosdevido, crpg.valorprincipalrecebido, crpg.valorprincipaldispensado, crpg.valormultarecebida, crpg.valormultadispensada, crpg.valorjurosrecebido, crpg.valorjurosdispensado, crpg.observacao
  • Index Cond: (crpg.contasareceber_faturamentos_cr_codigo = "*SELECT* 1".codigo)
Planning time : 11.766 ms
Execution time : 2,813.486 ms