Re: BUG #18643: EXPLAIN estimated rows mismatch
От | David Rowley |
---|---|
Тема | Re: BUG #18643: EXPLAIN estimated rows mismatch |
Дата | |
Msg-id | CAApHDvqqQrVeZ0A5eyPDwOpFRA=xGHgKZp=iY3gKU4gZ4UyVwg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: BUG #18643: EXPLAIN estimated rows mismatch (ming wei tan <mingwei.tc@gmail.com>) |
Ответы |
Re: BUG #18643: EXPLAIN estimated rows mismatch
|
Список | pgsql-bugs |
On Thu, 3 Oct 2024 at 07:17, ming wei tan <mingwei.tc@gmail.com> wrote: > > On 1/10/2024 18:43, Tom Lane wrote: > > In any case, in this toy example that lacks an ANALYZE step, > > the selectivity estimates are mostly going to be garbage. > > Thanks for the replies. I'm just checking if a bug is present here > is a bug. Even with ANALYZE, the first EXPLAIN estimates more rows > compared to the second, even though the second WHERE clause is > less restrictive. I think you already checked that and Tom answered mentioning the reason that this happens. We certainly could do better here, but, as Tom mentioned your example does not seem convincing enough to warrant much effort. You should read the commit message in [1] as that might help you understand the project's point of view for these sort of optimisations. See in particular the first sentence of the second paragraph. David [1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=8ec5429e2f422f4d570d4909507db0d4ca83bbac
В списке pgsql-bugs по дате отправления: