Re: A performance issue in ROW_NUMBER() OVER(ORDER BY NULL) [27 times slow than OVER()] V14.5

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: A performance issue in ROW_NUMBER() OVER(ORDER BY NULL) [27 times slow than OVER()] V14.5
Дата
Msg-id 3330162.1676841487@sss.pgh.pa.us
обсуждение исходный текст
Ответ на A performance issue in ROW_NUMBER() OVER(ORDER BY NULL) [27 times slow than OVER()] V14.5  (Kirk Wolak <wolakk@gmail.com>)
Ответы Re: A performance issue in ROW_NUMBER() OVER(ORDER BY NULL) [27 times slow than OVER()] V14.5  (David Rowley <dgrowleyml@gmail.com>)
Re: A performance issue in ROW_NUMBER() OVER(ORDER BY NULL) [27 times slow than OVER()] V14.5  (Kirk Wolak <wolakk@gmail.com>)
Список pgsql-general
Kirk Wolak <wolakk@gmail.com> writes:
>   I have some converted code that uses this syntax.

Seems kinda dumb, but ...

>   The solution is to remove the ORDER BY NULL.  [since that is not
> sortable, should it be ignored?]
>   This does NOT SHOW UP with 1 million rows.

I don't see it at all.  Comparing your two test queries on released
branches, I see maybe 2x penalty for the ORDER BY NULL, not 30x.
(In HEAD there's only about 13% penalty.)  I wonder what PG version
you are testing.

            regards, tom lane



В списке pgsql-general по дате отправления:

Предыдущее
От: Kirk Wolak
Дата:
Сообщение: A performance issue in ROW_NUMBER() OVER(ORDER BY NULL) [27 times slow than OVER()] V14.5
Следующее
От: David Rowley
Дата:
Сообщение: Re: A performance issue in ROW_NUMBER() OVER(ORDER BY NULL) [27 times slow than OVER()] V14.5