Re: unstable query plan on pg 16,17,18

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: unstable query plan on pg 16,17,18
Дата
Msg-id 5cd3d1e119e82e0cd79e0a55c4a9602fa3034392.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: unstable query plan on pg 16,17,18  (Attila Soki <atiware@gmx.net>)
Список pgsql-performance
On Mon, 2026-02-23 at 22:19 +0100, Attila Soki wrote:
> To "switch" between the ok and wrong plans I execute
> vacuumdb -Upostgres -vZ -t schema1.table_k db1
> multiple times (1x-3x) until the plan flips. So I thought the table should already have been analyzed.
> In my first email I called table_k as the "tbl_used_in_query"

Ok, I see.  Then a simple ANALYZE won't do.

Perhaps the column needs more detailed statistics?

  ALTER TABLE schema1.table_k ALTER dp_end_dat SET STATISTICS 1000;
  ANALYZE schema1.table_k (dp_end_dat);

> or have I misunderstood that with the analyze?

No; I missed that point.

Yours,
Laurenz Albe



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