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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Doug McNaught <doug(at)wireboard(dot)com>
Cc: mlw <markw(at)mohawksoft(dot)com>, Justin Clift <justin(at)postgresql(dot)org>, Mark kirkwood <markir(at)slingshot(dot)co(dot)nz>, PostgreSQL Hackers Mailing List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GENERAL] Re : Solaris Performance - Profiling (Solved)
Date: 2002-04-03 16:25:15
Message-ID: 9714.1017851115@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Doug McNaught <doug(at)wireboard(dot)com> writes:
> Actually, the C standard says nothing about what algorithm should be
> used for qsort(); it's simply supposed to be a fast in-memory sort.
> The qsort() name is just a historical artifact.

In practice I believe qsort usually is a quicksort; it's just too good
of a general-purpose algorithm. However you do need a good heuristic
for selecting the median value to split on, or you can get burnt by
corner cases. I'm guessing that Sun was careless and got burnt ...

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2002-04-03 16:25:59 Re: do foreign key checks lock parent table ?
Previous Message mlw 2002-04-03 16:24:18 Re: [GENERAL] Re : Solaris Performance - Profiling (Solved)

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2002-04-03 16:25:39 Re: Odd psql \i behaviour
Previous Message mlw 2002-04-03 16:24:18 Re: [GENERAL] Re : Solaris Performance - Profiling (Solved)