Re: Improving SQL performance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: carlos(dot)reimer(at)opendb(dot)com(dot)br
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Improving SQL performance
Date: 2007-01-11 18:31:07
Message-ID: 28140.1168540267@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Kim 2007-01-11 19:13:56 Re: unusual performance for vac following 8.2 upgrade
Previous Message Russell Smith 2007-01-11 18:28:07 Re: Improving SQL performance