Re: [HACKERS] sorting big tables :(

From: Michael Richards <miker(at)scifair(dot)acadiau(dot)ca>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] sorting big tables :(
Date: 1998-05-16 15:47:52
Message-ID: Pine.BSF.3.96.980516124300.13349A-100000@scifair.acadiau.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 15 May 1998, Bruce Momjian wrote:

> > I have a big table. 40M rows.
> > On the disk, it's size is:
> > 2,090,369,024 bytes. So 2 gigs. On a 9 gig drive I can't sort this table.
> > How should one decide based on table size how much room is needed?

> It is taking so much disk space because it is using a TAPE sorting
> method, by breaking the file into tape chunks and sorting in pieces, the
The files grow until I have 6 files of almost a gig each. At that point, I
start running out of space...
This TAPE sotring method. It is a simple merge sort? Do you know of a way
this could be done while using constant space and no more complexity in
the algorithim. Even if it is a little slower, the DBMS could decide based
on the table size whether it should use the tape sort or another one...
Bubble sort would not be my first choice tho :)

-Mike

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ryan Kirkpatrick 1998-05-16 16:48:17 Regression Test Analysis for Linux/Alpha...
Previous Message Oliver Elphick 1998-05-16 08:02:15 Re: CREATE DATABASE