Re: SELECT query results are different depending on whether tablestatistics are available.

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: SELECT query results are different depending on whether tablestatistics are available.
Дата
Msg-id CAKFQuwZuJfDTD5bnEpNj3Bpd6E2pdMF9jfUVBim+gp_ALmH7Eg@mail.gmail.com
обсуждение исходный текст
Ответ на SELECT query results are different depending on whether tablestatistics are available.  (James Brauman <james.brauman@envato.com>)
Ответы Re: SELECT query results are different depending on whether tablestatistics are available.
Список pgsql-general
On Wed, May 27, 2020 at 8:09 PM James Brauman <james.brauman@envato.com> wrote:
-- Run select query (involving several CTEs).
SELECT ...;

I haven't generated a minimal test case yet, but I did notice that if
all CTEs in the SELECT query are defined using AS NOT MATERIALIZED the
results are always the same regardless of whether the table has been
ANALYZED yet.

Could anyone share knowledge about why this is happening?

A likely scenario is you are missing an ORDER BY in a location where you are depending on deterministic row ordering and its changing out from underneath you.

David J.

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

Предыдущее
От: James Brauman
Дата:
Сообщение: SELECT query results are different depending on whether tablestatistics are available.
Следующее
От: James Brauman
Дата:
Сообщение: Re: SELECT query results are different depending on whether tablestatistics are available.