Ajuda com SELECT

Antonio Cesar <[email protected]>
Newsgroups gmane.comp.db.postgresql.brasil
Message-ID <071cecdc-6004-397d-ec57-6dd0c12a3567__21467.4484836452$1509623097$gmane$org@gmail.com>
Bom dia,

Estou com esse comando com uma percima peformace.

OBs Tava funcionando normal de uma hora para outra ficou muito lento.

"Limit  (cost=0.26..117.46 rows=100 width=385)"
"  ->  Nested Loop  (cost=0.26..36017.81 rows=30730 width=385)"
"        ->  Merge Join  (cost=0.26..27384.58 rows=30730 width=389)"
"              Merge Cond: (its.codigo = ip.codigo_item)"
"              Join Filter: (its.codigo_unidade = ip.codigo_unidade)"
"              ->  Index Scan using pk_item_codigo on item its 
(cost=0.00..8508.14 rows=33680 width=385)"
"                    Filter: ((tipo_item <> ALL ('{07,08}'::bpchar[])) 
AND (ativo = 'S'::bpchar))"
"              ->  Index Scan using pk_item_preco_codigo on item_preco 
ip  (cost=0.00..18258.11 rows=56550 width=8)"
"                    Index Cond: ((codigo_empresa = 2) AND 
(codigo_negocio = 1))"
"                    Filter: ((ativo)::bpchar = 'S'::bpchar)"
"        ->  Index Only Scan using pk_unidade_codigo on unidade un  
(cost=0.00..0.27 rows=1 width=4)"
"              Index Cond: (codigo = ip.codigo_unidade)"

Servidor:

mem 32GB

Linux debian

Processador 8 Nucle

Marca DELL

Conexao simutaneo 18

_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
cgcesarsoares.vcf (text/x-vcard, 153 B)
begin:vcard
fn:Antonio Cesar
n:;Antonio Cesar
email;internet:cgcesar-I4oVjbygTnVfyO9Q7EP/[email protected]
tel;cell:75 91120315
version:2.1
end:vcard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.