comp.lang.ada
 help / color / mirror / Atom feed
From: Hyman Rosen <hyrosen@mail.com>
Subject: Re: sorting large numbers of large records
Date: Mon, 28 Jul 2003 12:25:08 -0400
Date: 2003-07-28T12:25:08-04:00	[thread overview]
Message-ID: <1059409508.747658@master.nyc.kbcfp.com> (raw)
In-Reply-To: <bg3fgg$qig$1@grapevine.wam.umd.edu>

You should read Knuth's Sorting and Searching.
The classic way to do this is to read as many records
from the file as you can fit in memory, sort them, and
write them back out to another file. Keep doing this
until you have sorted all of your original records.
Now merge all the sorted subfiles together. You do that
by reading a record from each subfile, writing out the
smallest, and reading a new record from the file which
provided the record just written.




  parent reply	other threads:[~2003-07-28 16:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-28 15:29 sorting large numbers of large records Brien L. Christesen
2003-07-28 15:35 ` Vinzent Hoefler
2003-07-31 15:22   ` Brien L. Christesen
2003-07-28 16:25 ` Hyman Rosen [this message]
2003-07-28 20:30 ` John R. Strohm
2003-07-28 20:52   ` Hyman Rosen
2003-07-28 23:47     ` Matthew Heaney
2003-07-28 23:33 ` Matthew Heaney
2003-07-28 23:43 ` Matthew Heaney
2003-07-29  0:42 ` John Cupak
2003-07-29  3:38   ` Matthew Heaney
2003-07-29  8:32   ` Preben Randhol
  -- strict thread matches above, loose matches on Subject: below --
2003-07-29 13:10 Brien L. Christesen
2003-07-29 14:30 ` Larry Kilgallen
2003-07-30  0:32 ` Keith Thompson
2003-07-30  1:53   ` Hyman Rosen
2003-07-30 14:55     ` Matthew Heaney
2003-07-30 16:41       ` Chad R. Meiners
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox