Re: Plan not skipping unnecessary inner join

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org, hippysoyboy(at)gmail(dot)com, postgres(at)binarykeep(dot)com
Subject: Re: Plan not skipping unnecessary inner join
Date: 2020-05-17 14:05:39
Message-ID: CAEudQApPBa1BDcktwY3oc6hvRNs9hrHJNALfcJUc7gHvbhZ7fw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Em dom., 17 de mai. de 2020 às 10:31, Justin Pryzby <pryzby(at)telsasoft(dot)com>
escreveu:

> On Sun, May 17, 2020 at 09:32:47AM -0300, Ranier Vilela wrote:
> > I redid the same tests with vanila postgres and with empty tables.
> > I'm surprised, why does the plan have 2550 rows in explain?
>
> That's the *estimated* rowcount.
>
> The planner tends to ignore table statistics which say the table is empty,
> since that can lead to a terrible plan if it's not true (stats are out of
> date
> or autovacuum threshold not hit).
>
Thanks for the explanation.

regards,
Ranier Vilela

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message A Guy Named Ryan 2020-05-18 18:42:09 Execution time from >1s -> 80m+ when extra columns added in SELECT for sub-query
Previous Message Justin Pryzby 2020-05-17 13:31:24 Re: Plan not skipping unnecessary inner join