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

Поиск
Список
Период
Сортировка
От Andrei Lepikhov
Тема Re: unstable query plan on pg 16,17,18
Дата
Msg-id 091eef0e-0271-47d1-aa47-439284e3f316@gmail.com
обсуждение исходный текст
Ответ на Re: unstable query plan on pg 16,17,18  (Attila Soki <atiware@gmx.net>)
Список pgsql-performance
On 27/2/26 16:00, Attila Soki wrote:
> On 27 Feb 2026, at 09:15, Andrei Lepikhov <lepihov@gmail.com> wrote:
> I dont know the inner workings of analyze, is that normal that executing 
> analyze on unchanged data can flip the plan? Does analyze select a 
> random set of rows?

Yes, this is completely normal because ANALYZE works in a random way.
You can try using the Join-Order-Benchmark to see how running the 
ANALYZE command can change the execution time of the same query, 
sometimes by as much as ten times.

-- 
regards, Andrei Lepikhov,
pgEdge



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