Re: [PERFORM] strange and slow joining of nested views - Mailing list pgsql-performance

From Tom Lane
Subject Re: [PERFORM] strange and slow joining of nested views
Date
Msg-id 20264.1486185381@sss.pgh.pa.us
Whole thread Raw
In response to [PERFORM] strange and slow joining of nested views  (Titus von Boxberg <titus@elbe-informatik.de>)
Responses Re: [PERFORM] strange and slow joining of nested views  (Titus von Boxberg <titus@elbe-informatik.de>)
List pgsql-performance
Titus von Boxberg <titus@elbe-informatik.de> writes:
> I got the following problem for which I could not find a solution by searching the archives:
> I have Tables Ta, Tb, Tc with primary keys as bigserials.
> Ta references Tb references Tc.
> Not all but most rows in Ta reference exactly one row in Tb.

Hm, your problem query has 11 table scans (not to mention a couple of
subplans) so you're oversimplifying here.  Anyway, I think that increasing
join_collapse_limit and/or from_collapse_limit to at least 11 might help.
As-is, you're more or less at the mercy of whether your textual query
structure corresponds to a good join order.

            regards, tom lane


pgsql-performance by date:

Previous
From: Titus von Boxberg
Date:
Subject: [PERFORM] strange and slow joining of nested views
Next
From: Vucomir Ianculov
Date:
Subject: Re: [PERFORM] pgsql connection timeone