Re: BUG #17862: Overall query cost ignores window function

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: BUG #17862: Overall query cost ignores window function
Дата
Msg-id CAApHDvrwsqZDouZPv-JHgptwWwLarwuhzSYcD4DUo0j_uhWf2w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #17862: Overall query cost ignores window function  (David Rowley <dgrowleyml@gmail.com>)
Список pgsql-bugs
On Sat, 25 Mar 2023 at 14:40, David Rowley <dgrowleyml@gmail.com> wrote:
> I think what it would take would be to look at each WindowFunc and
> then estimate how many rows we need to look at for each WindowClause
> and then take the Max of that number of rows and calculate the
> proportion of the subpath's total cost we need to use based on the
> number of estimated rows from the subpath.  I think the total subpath
> rows would need to be divided by the ndistinct estimate for the
> PARTITION BY clause too.

I've written patch to fix this and started a thread on -hackers [1] to
discuss it.

David

[1] https://postgr.es/m/CAApHDvrB0S5BMv+0-wTTqWFE-BJ0noWqTnDu9QQfjZ2VSpLv_g@mail.gmail.com



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: ERROR: no NOT NULL constraint found to drop
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17892: Bug primary key