Re: Query performance problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: dmota(at)nexen(dot)com(dot)br
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Query performance problem
Date: 2004-08-20 16:34:48
Message-ID: 22878.1093019688@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Danilo Mota" <dmota(at)nexen(dot)com(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Bruno Wolff III 2004-08-20 16:48:21 Re: Query performance problem
Previous Message Danilo Mota 2004-08-20 16:25:30 Query performance problem