Brain-Dead Sort Algorithm???

Поиск
Список
Период
Сортировка
От Tim Perdue
Тема Brain-Dead Sort Algorithm???
Дата
Msg-id 199912030234.SAA12533@www.geocrawler.com
обсуждение исходный текст
Ответы Re: [HACKERS] Brain-Dead Sort Algorithm???  ("Aaron J. Seigo" <aaron@gtv.ca>)
Re: [HACKERS] Brain-Dead Sort Algorithm???  (Don Baccus <dhogaza@pacifier.com>)
Список pgsql-hackers
This message was sent from Geocrawler.com by "Tim Perdue" <tim@perdue.net>
Be sure to reply to that address.

In the various versions of Postgres that I've
used, I've just been amazed at how stupid the
sorting process is.

I'm trying to SELECT DISTINCT on a table that is
60MB:

-rw-------   1 postgres postgres 89799976 Dec  2
20:27 pg_sorttemp32736.0
-rw-------   1 postgres postgres 87307680 Dec  2
20:27 pg_sorttemp32736.1
-rw-------   1 postgres postgres 84376872 Dec  2
20:27 pg_sorttemp32736.2
-rw-------   1 postgres postgres 78645944 Dec  2
20:27 pg_sorttemp32736.3
-rw-------   1 postgres postgres 66749412 Dec  2
20:27 pg_sorttemp32736.4
-rw-------   1 postgres postgres 71360512 Dec  2
20:29 pg_sorttemp32736.5
-rw-------   1 postgres postgres 260677944 Dec  2
20:28 pg_sorttemp32736.6


It uses over 1GB of disk space to do that sort,
and it would have used a lot more if I hadn't run
out.

Then it won't fail gracefully, instead of just
hangs and leaves temp files completely filling up
the hard drive.

How can it use 1GB of disk to sort a 60MB file?

Tim


Geocrawler.com - The Knowledge Archive


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

Предыдущее
От: Vince Vielhaber
Дата:
Сообщение: Re: [HACKERS] Neat article you will want to read.
Следующее
От: "Aaron J. Seigo"
Дата:
Сообщение: Re: [HACKERS] Brain-Dead Sort Algorithm???