From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
---|---|
To: | Tim Palmer <tim3sp(at)gmail(dot)com> |
Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #17862: Overall query cost ignores window function |
Date: | 2023-04-12 09:05:55 |
Message-ID: | CAApHDvrwsqZDouZPv-JHgptwWwLarwuhzSYcD4DUo0j_uhWf2w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Sat, 25 Mar 2023 at 14:40, David Rowley <dgrowleyml(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | PG Bug reporting form | 2023-04-12 10:30:10 | BUG #17892: Bug primary key |
Previous Message | Michael Paquier | 2023-04-12 00:31:51 | Re: ERROR: no NOT NULL constraint found to drop |