RE: [HACKERS] sorting big tables :(

Поиск
Список
Период
Сортировка
От Stupor Genius
Тема RE: [HACKERS] sorting big tables :(
Дата
Msg-id 000301bd8449$3c57ada0$7f99accf@darren
обсуждение исходный текст
Ответ на Re: [HACKERS] sorting big tables :(  (Michal Mosiewicz <mimo@interdata.com.pl>)
Список pgsql-hackers
> Last question... What's the purpose of such a big sort? If somebody gets
> 40M of sorted records in a result of some query, what would he do with
> it? Is he going to spent next years on reading this lecture? I mean,
> isn't it worth to query the database for necessary informations only and
> then sort it?

Not all query results are for human eyes.  I'd venture to say that more
queries are fed into report generators for formatting than are looked at
directly from psql.

A sort is required in some cases where not explicitly requested.

For example, a GROUP BY clause.  You _could_ get the data back ungrouped,
but then you'd have to pipe it to another application or script to do the
sorting and then the grouping (or perhaps group on the fly).  But then
perhaps that app/script will eat all the memory or disk space and you'd
be in the same pickle as before.

darrenk

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

Предыдущее
От: "Henry B. Hotz"
Дата:
Сообщение: Re: [HACKERS] Kerberos 5 breakage.
Следующее
От: Oleg Broytmann
Дата:
Сообщение: Re: [HACKERS] sorting big tables :(