pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Carlos H. Reimer <carlos.reimer@opendb.com.br>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: RES: Improving SQL performance
Date: Fri, 12 Jan 2007 15:37:13 -0200
Message-ID: <PEEPKDFEHHEMKBBFPOOKKEENDNAA.carlos.reimer@opendb.com.br> (raw)
In-Reply-To: <28140.1168540267@sss.pgh.pa.us>

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

Thank you!

Reimer



> -----Mensagem original-----
> De: pgsql-performance-owner@postgresql.org
> [mailto:pgsql-performance-owner@postgresql.org]Em nome de Tom Lane
> Enviada em: quinta-feira, 11 de janeiro de 2007 16:31
> Para: carlos.reimer@opendb.com.br
> Cc: pgsql-performance@postgresql.org
> Assunto: Re: [PERFORM] Improving SQL performance 
> 
> 
> "Carlos H. Reimer" <carlos.reimer@opendb.com.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
> 
> 



view thread (3+ messages)

Message-ID: <PEEPKDFEHHEMKBBFPOOKKEENDNAA.carlos.reimer@opendb.com.br>
Permalink:  ../PEEPKDFEHHEMKBBFPOOKKEENDNAA.carlos.reimer@opendb.com.br/
Also on:    postgresql.org/message-id/PEEPKDFEHHEMKBBFPOOKKEENDNAA.carlos.reimer@opendb.com.br

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: carlos.reimer@opendb.com.br, tgl@sss.pgh.pa.us
  Subject: Re: RES: Improving SQL performance
  In-Reply-To: <PEEPKDFEHHEMKBBFPOOKKEENDNAA.carlos.reimer@opendb.com.br>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox