pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: dmota@nexen.com.br
Cc: pgsql-performance@postgresql.org
Subject: Re: Query performance problem
Date: Fri, 20 Aug 2004 12:34:48 -0400
Message-ID: <22878.1093019688@sss.pgh.pa.us> (raw)
In-Reply-To: <002201c486d2$4fbe4420$8afea8c0@nexen.lan>
References: <002201c486d2$4fbe4420$8afea8c0@nexen.lan>

"Danilo Mota" <dmota@nexen.com.br> writes:
> SELECT
>  rc.pkcliente
> FROM r_cliente AS rc
> INNER JOIN sav_cliente_lg AS sc ON sc.cpfcnpj = sc.cpfcnpj;

Surely you meant
  INNER JOIN sav_cliente_lg AS sc ON rc.cpfcnpj = sc.cpfcnpj;

I would also venture that your statistics are desperately out of date,
because if the planner's estimates are close to reality, even this
unconstrained-cross-product join shouldn't have taken that long.
 
			regards, tom lane



view thread (6+ messages)  latest in thread

Message-ID: <22878.1093019688@sss.pgh.pa.us>
Permalink:  ../22878.1093019688@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22878.1093019688@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, dmota@nexen.com.br
  Subject: Re: Query performance problem
  In-Reply-To: <22878.1093019688@sss.pgh.pa.us>

* 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