RE: New Window Function: ROW_NUMBER_DESC() OVER() ?
От | Maiquel Grassi |
---|---|
Тема | RE: New Window Function: ROW_NUMBER_DESC() OVER() ? |
Дата | |
Msg-id | CP4P284MB2483032E6B4B5A10DE5EC731EC722@CP4P284MB2483.BRAP284.PROD.OUTLOOK.COM обсуждение исходный текст |
Ответ на | RE: New Window Function: ROW_NUMBER_DESC() OVER() ? (Maiquel Grassi <grassi@hotmail.com.br>) |
Ответы |
Re: New Window Function: ROW_NUMBER_DESC() OVER() ?
|
Список | pgsql-hackers |
As far as I see your proposal, you want to allow something that is
undefined to be reversed. I don't think this is a good idea at all.
As mentioned by others, you should have ORDER BY clauses and just add
a DESC.
undefined to be reversed. I don't think this is a good idea at all.
As mentioned by others, you should have ORDER BY clauses and just add
a DESC.
- Okay, now I'm convinced of that.
If you were looking for something to optimize in this rough area, then
perhaps adding some kind of "Backward WindowAgg" node (by overloading
the existing node) to allow queries such as the following to be
executed without an additional sort.
SELECT a,row_number() over (order by a desc) from t order by a;
- David, considering this optimization, allowing for that, do you believe it is plausible to try advancing towards a possible Proof of Concept (PoC) implementation?
Maiquel.
В списке pgsql-hackers по дате отправления: