Re: join on three tables is slow

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gerry Reno <greno(at)verizon(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: join on three tables is slow
Date: 2007-12-12 04:35:57
Message-ID: 11806.1197434157@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Gerry Reno <greno(at)verizon(dot)net> writes:
> Pavel Stehule wrote:
>> there is diference in agg position. Send, please, query and explain
>> analyze output.

[ explain analyze output ]

The rowcount estimates seem pretty far off, even for simple cases that
I'd expect it to get right, eg

> -> Seq Scan on res_partner_address a (cost=0.00..88.40
> rows=16 width=552) (actual time=0.851..16.131 rows=559 loops=1)
> Filter: ((("type")::text = 'default'::text) OR ("type" IS
> NULL))

Are the ANALYZE stats up to date for these tables?

What PG version is this, anyway?

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Paul Lambert 2007-12-12 05:15:21 Function result using execute
Previous Message Paul Lambert 2007-12-12 01:34:35 Query design assistance - getting daily totals