Re: [Testcase] Queries running forever, because of wrong rowcount estimate

Поиск
Список
Период
Сортировка
От Peter
Тема Re: [Testcase] Queries running forever, because of wrong rowcount estimate
Дата
Msg-id Y+p+5fNZqzosknBf@disp.intra.daemon.contact
обсуждение исходный текст
Ответ на Re: [Testcase] Queries running forever, because of wrong rowcount estimate  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Mon, Feb 13, 2023 at 12:38:12PM -0500, Tom Lane wrote:
! Peter <pmc@citylink.dinoex.sub.org> writes:
! > "rows=1" in the "Hash Anti Join" line is WRONG. It should be
! > 3000000. Or at least some thousands.
! 
! FWIW, this behaves better in v14 and up.  In older versions there's
! an ambiguity about what relpages=reltuples=0 means; it's the state
! when ANALYZE has never yet examined the table contents, but it's
! also the state when we have found the table to be empty.  Because
! of the former case, older planner versions don't like to believe
! that a table is empty even if reltuples says so.

Thanks, Tom, I found that as change 3d351d916b2 - that should
make the issue more unlikely and not so prone to happen during
testing.
OTOH, that code did apparently not do anything evil that would
not be possible to happen under other circumstances. It's unlikely,
because one would at some point change such queries to a more
performant style, but I am currently trying to understand why
it can happen at all...

cheers,
PMc



В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [Testcase] Queries running forever, because of wrong rowcount estimate
Следующее
От: Damian Carey
Дата:
Сообщение: HOWTO? Permissions for user to access a single db