Re: Large Join Dies - Mailing list pgsql-admin

From Jeremy Buchmann
Subject Re: Large Join Dies
Date
Msg-id 3CBE14D0.4030205@wellsgaming.com
Whole thread Raw
In response to Large Join Dies  ("Jeff Madison" <jeff@ikano.com>)
List pgsql-admin
Jeff Madison wrote:
> Running Postgres 7.1.4 from RedHad RPM on RedHat 7.2.  When ever we run
> a query where we are joining more than 3 tables the query never returns.
> Any ideas?
>
> Jeff

Jeff,

It would help to know things like:

  * What the exact query is (and an EXPLAIN of the query)

  * How big the tables are (and the general schema)

  * What kind of hardware you're running on

Off the top of my head, I would say check your table1.key = table2.key
join constraints.  More than three tables leads to a lot of constraints
and if you miss just one, you'll get a big cartesian product that will
make the query seemingly go on forever even if your tables are of moderate
size.

--Jeremy



pgsql-admin by date:

Previous
From: "Jeff Madison"
Date:
Subject: Large Join Dies
Next
From: Tom Lane
Date:
Subject: Re: Connection terminates but postmaster proc lives on...?