Re: 回复: An implementation of multi-key sort

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: 回复: An implementation of multi-key sort
Дата
Msg-id CA+TgmoY=uUQxKZwOkMJgS0ufMSiB9a78OaViLEwz336S5Rbh8Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: 回复: An implementation of multi-key sort  (Konstantin Knizhnik <knizhnik@garret.ru>)
Список pgsql-hackers
On Sun, Jul 7, 2024 at 2:32 AM Konstantin Knizhnik <knizhnik@garret.ru> wrote:
> If mksort really provides advantage only when there are a lot of
> duplicates (for prefix keys?) and of small fraction of duplicates there
> is even some (small) regression
> then IMHO taking in account in planner information about estimated
> number of distinct values seems to be really important.

I don't think we can rely on the planner's n_distinct estimates for
this at all. That information tends to be massively unreliable when we
have it at all. If we rely on it for good performance, it will be easy
to find cases where it's wrong and performance is bad.

--
Robert Haas
EDB: http://www.enterprisedb.com



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: XML test error on Arch Linux
Следующее
От: Nathan Bossart
Дата:
Сообщение: Re: improve performance of pg_dump with many sequences