Re: Inaccurate (sometimes wildly so) row estimates for simple join

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Greg Nolle <greg(dot)nolle(at)voidbridge(dot)com>
Cc: PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Inaccurate (sometimes wildly so) row estimates for simple join
Date: 2020-05-22 14:30:16
Message-ID: CAHOFxGpFXtZvnCeqZ3Rcy-6MnkDCRKSNe_mLOdijP+hh+wt8Ww@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, May 22, 2020 at 7:27 AM Greg Nolle <greg(dot)nolle(at)voidbridge(dot)com>
wrote:

> The crux seems to be that test_b does not have an even distribution for
> a_id values: it only has records for two of the values in the referenced
> table. This is how our real dataset is too and isn’t something we can
> really change.
>

How does it perform with extended statistics created for these two columns?

https://www.postgresql.org/docs/current/sql-createstatistics.html

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Greg Nolle 2020-05-22 14:42:46 Re: Inaccurate (sometimes wildly so) row estimates for simple join
Previous Message Michael Lewis 2020-05-22 14:26:05 Re: Suggestion to improve query performance of data validation in proc.