Re: Accounting for between table correlation - Mailing list pgsql-general

From Michael Lewis
Subject Re: Accounting for between table correlation
Date
Msg-id CAHOFxGrwYK41=e0BESL0ZNRvebZCe8ZKm+ZNkie5zz+64FgOxQ@mail.gmail.com
Whole thread Raw
In response to Re: Accounting for between table correlation  (Alexander Stoddard <alexander.stoddard@gmail.com>)
Responses Re: Accounting for between table correlation  (Alexander Stoddard <alexander.stoddard@gmail.com>)
List pgsql-general
On Fri, Jan 15, 2021 at 3:27 PM Alexander Stoddard <alexander.stoddard@gmail.com> wrote:
The queries are complex, multiple joins to 10 plus tables, although most are to tiny enum type lookup tables. I believe it is the join between the two large tables that I have described that causes the issue, and that seems to be reflected in the different strategies in the plans. For my own learning and to clarify the problem I probably will have to try and reproduce the behavior in a test case.
 ...
I am doing nothing to specify the optimizer. Do I have configurable options in that regard? I was unaware of them. 

Read up on join_collapse_limit and geqo.


Note that you can set these values within your session to check and even just run explain [query] to check if the plan that would be used varies.

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Error messages on duplicate schema names
Next
From: Alexander Stoddard
Date:
Subject: Re: Accounting for between table correlation