Re: FETCH FIRST clause WITH TIES option
От | Tomas Vondra |
---|---|
Тема | Re: FETCH FIRST clause WITH TIES option |
Дата | |
Msg-id | 65ecc991-97aa-50a2-7131-10c8b3991c8c@2ndquadrant.com обсуждение исходный текст |
Ответ на | Re: FETCH FIRST clause WITH TIES option (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: FETCH FIRST clause WITH TIES option
|
Список | pgsql-hackers |
On 10/31/2018 06:17 PM, Robert Haas wrote: > On Mon, Oct 29, 2018 at 12:48 PM Andrew Gierth > <andrew@tao11.riddles.org.uk> wrote: >> Then FETCH FIRST N WITH TIES becomes "stop when the expression >> rank() over (order by ...) <= N >> is no longer true" (where the ... is the existing top level order by) > > Wouldn't that be wicked expensive compared to something hard-coded > that does the same thing? > Not sure, but that was one of my concerns too, particularly for the simple FETCH FIRST N WITH TIES case. But I think Andrew has a point it would make it much easier to implement the PERCENT case. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления: