RES: Improving SQL performance

From: "Carlos H(dot) Reimer" <carlos(dot)reimer(at)opendb(dot)com(dot)br>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: RES: Improving SQL performance
Date: 2007-01-12 17:37:13
Message-ID: PEEPKDFEHHEMKBBFPOOKKEENDNAA.carlos.reimer@opendb.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Yes, casting the result improved the time response a lot.

Thank you!

Reimer

> -----Mensagem original-----
> De: pgsql-performance-owner(at)postgresql(dot)org
> [mailto:pgsql-performance-owner(at)postgresql(dot)org]Em nome de Tom Lane
> Enviada em: quinta-feira, 11 de janeiro de 2007 16:31
> Para: carlos(dot)reimer(at)opendb(dot)com(dot)br
> Cc: pgsql-performance(at)postgresql(dot)org
> Assunto: Re: [PERFORM] Improving SQL performance
>
>
> "Carlos H. Reimer" <carlos(dot)reimer(at)opendb(dot)com(dot)br> writes:
> > I know that the problem with the following SQL is the "LOG.CODCEP =
> > ENDE.CODCEP||CODLOG" condition, but what can I
> > do to improve the performance?
>
> Seems the problem is not using an index for tt_log. Do you have an
> index on tt_log.codcep? If so, maybe you need to cast the result of
> the concatenation to char(8) to get it to use the index.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org
>
>

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Simon Riggs 2007-01-12 19:50:54 Re: [HACKERS] table partioning performance
Previous Message Jim C. Nasby 2007-01-12 17:33:06 Re: [PERFORM] unusual performance for vac following 8.2upgrade