Re: [GENERAL] Re : Solaris Performance - Profiling (Solved)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] Re : Solaris Performance - Profiling (Solved)
Дата
Msg-id 12695.1017869439@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [GENERAL] Re : Solaris Performance - Profiling (Solved)  (mlw <markw@mohawksoft.com>)
Список pgsql-hackers
mlw <markw@mohawksoft.com> writes:
> quicksort is a pretty poor algorithm if your data is in some kind of order
> already.

Only if you fail to take standard precautions against making a bad
choice of pivot element; every discussion I've ever seen of quicksort
explains ways to avoid that pitfall.  Solaris' problem seems to be a
more subtle issue having to do with large numbers of equal keys.  The
form of quicksort that Knuth presents is tuned to behave well in that
situation, at the cost of exchanging equal records (cf. his exercise
5.2.2.18) ... perhaps Sun overlooked that particular hack, or got it
wrong.
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: timeout implementation issues
Следующее
От: mlw
Дата:
Сообщение: Re: Suggestions please: names for function cachability attributes