Re: Planner misestimation for JOIN with VARCHAR - Mailing list pgsql-general

From Michael Lewis
Subject Re: Planner misestimation for JOIN with VARCHAR
Date
Msg-id CAHOFxGo4nQ7-KnQ0PrHZLG5ftXc2xY=gK712KRGq6COMKMVMFg@mail.gmail.com
Whole thread Raw
In response to Planner misestimation for JOIN with VARCHAR  (Sebastian Dressler <sebastian@swarm64.com>)
Responses Re: Planner misestimation for JOIN with VARCHAR  (David Rowley <dgrowleyml@gmail.com>)
Re: Planner misestimation for JOIN with VARCHAR  (Sebastian Dressler <sebastian@swarm64.com>)
List pgsql-general
On Tue, Jun 9, 2020 at 12:34 PM Sebastian Dressler <sebastian@swarm64.com> wrote:
- Add an index on top of the whole PK
- Add indexes onto other columns trying to help the JOIN
- Add additional statistics on two related columns

Another idea I had was to make use of generated columns and hash the PKs together to an BIGINT and solely use this for the JOIN. However, this would not work when not all columns of the PK are used for the JOIN.

Can you expand on the additional statistics you created? Why was it on only two columns? Did you include MCVs type of extended stats?

pgsql-general by date:

Previous
From: Peter
Date:
Subject: Re: Something else about Redo Logs disappearing
Next
From: Adrian Klaver
Date:
Subject: Re: Something else about Redo Logs disappearing