From: | Surafel Temesgen <surafel3000(at)gmail(dot)com> |
---|---|
To: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, andrew(at)tao11(dot)riddles(dot)org(dot)uk, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: FETCH FIRST clause WITH TIES option |
Date: | 2019-01-15 10:07:58 |
Message-ID: | CALAY4q9Zd24E8OEBxOHfqQbp6u+xePXrFsnvM5xoy1pq1APUgw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jan 2, 2019 at 6:19 PM Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
wrote:
> After looking at the "FETCH FIRST ... PERCENT" patch, I wonder if this
> patch should tweak estimates in some way. Currently, the cardinality
> estimate is the same as for plain LIMIT, using the requested number of
> rows. But let's say there are very few large groups - that will
> naturally increase the number of rows produced.
>
> As an example, let's say the subplan produces 1M rows, and there are
> 1000 groups (when split according to the ORDER BY clause).
>
can we use ORDER BY column raw statistic in limit node reliably? because it
seems to me it can be affected by other operation in a subplan like filter
condition
regards
Surafel
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2019-01-15 10:16:54 | Re: Synchronous replay take III |
Previous Message | Adrien NAYRAT | 2019-01-15 10:05:16 | Re: Log a sample of transactions |