Re: Accounting for between table correlation

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Thomas Kellerer <shammat(at)gmx(dot)net>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Accounting for between table correlation
Date: 2021-01-15 16:26:10
Message-ID: CAKFQuwYCoqUkNTe3jjXr5ThCv-xw70uEwST97xXGnm9zS-A0aA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jan 15, 2021 at 9:10 AM Thomas Kellerer <shammat(at)gmx(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Hemil Ruparel 2021-01-15 16:26:52 Re: Best tools to monitor and fine tune postgres
Previous Message Atul Kumar 2021-01-15 16:25:04 Re: Best tools to monitor and fine tune postgres