Re: [BUGS] BUG #11500: PRIMARY KEY index not being used

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: [BUGS] BUG #11500: PRIMARY KEY index not being used
Дата
Msg-id CAApHDvoYJ44s4pW8p2Fgikj22FQaYLpf2YDXRpkCLquH2kW35g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [BUGS] BUG #11500: PRIMARY KEY index not being used  (Marko Tiikkaja <marko@joh.to>)
Список pgsql-bugs
On Sat, 11 Oct 2025 at 03:53, Marko Tiikkaja <marko@joh.to> wrote:
>
> On Mon, Oct 6, 2025 at 2:35 PM David Rowley <dgrowleyml@gmail.com> wrote:
> > Are
> > you certain that no rows are matching the state = 'WAIT_EVENT' qual?
>
> There are, around 80k rows, but it fluctuates quite a bit.

Thanks for confirming that. That is subtly different from what you
indicated in the last report, and it does seem like my suspicions in
[1] were correct after all.

Unfortunately, you've hit a limitation in our cost model and we can't
really do much about that as a bug fix as it comes down to design.

The no-op function you've added (which I assume is a stable plpgsql
function to return the input order_state enum) is an adequate
workaround to stop the wait_event index being used for the problem
query.

David

[1] https://postgr.es/m/CAApHDvp=+EN2o=8fD47nyKKOSiQbLdYGLfUb=2obLWwQxUjyfg@mail.gmail.com



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