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

From David G. Johnston
Subject Re: Accounting for between table correlation
Date
Msg-id CAKFQuwYCoqUkNTe3jjXr5ThCv-xw70uEwST97xXGnm9zS-A0aA@mail.gmail.com
Whole thread Raw
In response to Re: Accounting for between table correlation  (Thomas Kellerer <shammat@gmx.net>)
Responses Re: Accounting for between table correlation  (Alexander Stoddard <alexander.stoddard@gmail.com>)
List pgsql-general
On Fri, Jan 15, 2021 at 9:10 AM Thomas Kellerer <shammat@gmx.net> wrote:
Atul Kumar schrieb am 15.01.2021 um 16:29:
> As per Ron, you are not supposed to ask your questions here.
>
> As According to him, we should keep on doing research on internet
> rather than asking for support directly even you have done enough
> research and until unless “Ron” won’t be satisfied you have to do
> keep on researching.

Ron's question was perfectly valid.

Missing and wrong statistics are one reason for the planner to choose a bad execution plan.

Yeah, at first blush I didn't think analyze really mattered (and it mostly doesn't because while you can keep the statistics up-to-date the multi-table nature of the problem means they are only marginally helpful here), but that just points out the under-specified nature of the original posting.  Taken as a simple question of "is there a way to work around the lack of multi-table statistics" the analyze, and even the specific queries, don't matter all that much.  But it also would be much more useful if the OP would choose a single problematic query and show the schema, query, and explain results, hopefully both good and bad, and comment on how analyze seems to affect the plan choice.  But for the general question about overcoming our statistics limitations the analyze point is not relevant.

David J.

pgsql-general by date:

Previous
From: Atul Kumar
Date:
Subject: Re: Best tools to monitor and fine tune postgres
Next
From: Hemil Ruparel
Date:
Subject: Re: Best tools to monitor and fine tune postgres