RE: [HACKERS] sorting big tables :(

From: "Stupor Genius" <stuporg(at)erols(dot)com>
To: "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Cc: "Michal Mosiewicz" <mimo(at)interdata(dot)com(dot)pl>
Subject: RE: [HACKERS] sorting big tables :(
Date: 1998-05-20 23:44:31
Message-ID: 000301bd8449$3c57ada0$7f99accf@darren
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Broytmann 1998-05-21 06:12:50 Re: [HACKERS] sorting big tables :(
Previous Message Henry B. Hotz 1998-05-20 21:15:57 Re: [HACKERS] Kerberos 5 breakage.