Re: A worst case for qsort

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: A worst case for qsort
Дата
Msg-id CA+TgmobewrKKHG6wPovAmS3EZH+3kvD7Wv2uBWyiyyVbuzhidw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: A worst case for qsort  (Peter Geoghegan <pg@heroku.com>)
Ответы Re: A worst case for qsort  (Stephen Frost <sfrost@snowman.net>)
Re: A worst case for qsort  (Peter Geoghegan <pg@heroku.com>)
Список pgsql-hackers
On Thu, Aug 7, 2014 at 5:52 PM, Peter Geoghegan <pg@heroku.com> wrote:
> On Thu, Aug 7, 2014 at 2:34 PM, Rod Taylor <rod.taylor@gmail.com> wrote:
>> This one is frequently sorted as batch operations against the files are
>> performed in alphabetical order to reduce conflict issues that a random
>> ordering may cause between jobs.
>
> Sure. There are cases out there. But, again, I have a hard time
> imagining why you'd expect those to be pre-sorted in practice, ...

Well, I'm not sure why you're having a hard time imagining it.
Presorted input is a common case in general; that's why we have a
check for it.  That check adds overhead in the non-pre-sorted case to
improve the pre-sorted case, and nobody's ever argued for removing it
that I can recall.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: replication commands and log_statements
Следующее
От: Marko Tiikkaja
Дата:
Сообщение: pgcrypto: PGP armor headers