Re: Fix incorrect start up costs for WindowAgg paths (bug #17862)

From: Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix incorrect start up costs for WindowAgg paths (bug #17862)
Date: 2023-04-12 14:28:34
Message-ID: CAKU4AWqDHY6KYcuKuRTpWngvgtT7aGPSZCYWjYHZv2m4CQwsNA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 12, 2023 at 5:04 PM David Rowley <dgrowleyml(at)gmail(dot)com> wrote:

>
> With the attached patch, that turns into:
>

The concept of startup_tuples for a WindowAgg looks good to me, but I
can't follow up with the below line:

+ return clamp_row_est(partition_tuples * DEFAULT_INEQ_SEL);

# select count(*) over() from tenk1 limit 1;
count
-------
10000 --> We need to scan all the tuples.

Should we just return clamp_row_est(partition_tuples)?

--
Best Regards
Andy Fan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2023-04-12 14:33:22 Re: longfin missing gssapi_ext.h
Previous Message Dagfinn Ilmari Mannsåker 2023-04-12 14:23:58 Re: Direct I/O