Re: [HACKERS] \dt and disk access
| От | Thomas G. Lockhart |
|---|---|
| Тема | Re: [HACKERS] \dt and disk access |
| Дата | |
| Msg-id | eb5008348a67f46ac71ef5af2d932b26 обсуждение исходный текст |
| Ответ на | [HACKERS] \dt and disk access (Bruce Momjian <maillist@candle.pha.pa.us>) |
| Список | pgsql-hackers |
Bruce Momjian wrote:
> It looks like psort()'s use of disk files to do the sorting is causing
> the slowdown, with the multiple create's and unlink's. I am going to
> modify psort() to use memory buffers instead of disk files for sorting
> small SELECT results. psort() is only called by ExecSort, which is used
> by ORDER BY's.
>
> Permission to put this in 6.1p1?
IMHO sounds like a *bad* idea, since it might take a while to debug.
Better to leave this as a feature for now (Postgres has had this
forever?) and come up with something great for v6.2; I'd be interested
in contributing to this if it would be helpful.
I don't know which Knuth algorithm the code uses, but some sort
algorithms perform very poorly on data which happens to be already
sorted. QuickSort, which comes on many Unix boxes (the qsort() call) is
quickest on completely unordered/disordered data and its slowest
performance is on already perfectly sorted data (I'm doing this from
memory, but the facts may be mostly correct :).
- Tom
------------------------------
В списке pgsql-hackers по дате отправления: