Yes, casting the result improved the time response a lot.
Thank you!
Reimer
> -Mensagem original-
> De: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] nome de Tom Lane
> Enviada em: quinta-feira, 11 de janeiro de 2007 16:31
> Para: [EMAIL PROTECTED]
> Cc: pgsql-performance@postgresql.or
Hi, Carlos,
Wouldn't it be better if you used INT in 'codcep' in both tables (as
CEP/ZIP numbers are [0-9]{8})? Casting as Tom Lane suggested is also a
good alternative, yet I think it'd be much better if you used int in
both columns.
Regards,
Cesar
Let's see the query:
SELECT ENDE.* , DEN
Yes, I do have an index on tt_log.codcep.
Indexes I´ve on both tables:
tt_end
Indexes:
"pk_end" PRIMARY KEY, btree (filcli, codcli, codfil, numend)
"ak_end_numdoc" UNIQUE, btree (numdoc)
"i_fk_end_darc" btree (codarc, tiparc)
"i_fk_end_dend" btree (tipend)
"i_fk_end_dfil" btre