Subject | Slow select... |
---|---|
Author | rejanem@bol.com.br |
Post date | 2001-07-26T19:42:28Z |
Hello,
I'm with a problem in this Select:
select c.cep_codigo,
c.cep_cep8,
c.cep_endereco,
c.cep_endereco_tipo,
c.cep_complemento,
c.cep_cidade,
c.cep_bairro,
(select b.bai_nome from bairro b where
b.bai_codigo=c.cep_bairro) as bairro
from cep c
where cep_cidade = 124
and cep_endereco like '%ABACATE%'
It's very slow, my table has 576.380 registries.
But if I use the same sql without the operator 'like',
the sql is fast!
Is there another way that I can filter the
field 'cep_endereco' without using the operator 'like'
that return me the result highest?
Thanks
Rejane
__________________________________________________________________________
Acesso pelo menor pre�o do mercado! R$ 14,90 nos 3 primeiros meses!
ASSINE AGORA! http://www.bol.com.br/acessobol/
I'm with a problem in this Select:
select c.cep_codigo,
c.cep_cep8,
c.cep_endereco,
c.cep_endereco_tipo,
c.cep_complemento,
c.cep_cidade,
c.cep_bairro,
(select b.bai_nome from bairro b where
b.bai_codigo=c.cep_bairro) as bairro
from cep c
where cep_cidade = 124
and cep_endereco like '%ABACATE%'
It's very slow, my table has 576.380 registries.
But if I use the same sql without the operator 'like',
the sql is fast!
Is there another way that I can filter the
field 'cep_endereco' without using the operator 'like'
that return me the result highest?
Thanks
Rejane
__________________________________________________________________________
Acesso pelo menor pre�o do mercado! R$ 14,90 nos 3 primeiros meses!
ASSINE AGORA! http://www.bol.com.br/acessobol/