pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <maillist@candle.pha.pa.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Steven M. Wheeler <swheeler@sabre.com>
Cc: pgsql-sql@hub.org
Subject: Re: [SQL] Questions about vacuum analyze
Date: Mon, 11 Oct 1999 11:07:44 -0400 (EDT)
Message-ID: <199910111507.LAA29115@candle.pha.pa.us> (raw)
In-Reply-To: <7659.939652362@sss.pgh.pa.us>

> I didn't know much about it either until the comments in psort.c led me
> to read the relevant parts of Knuth.  Tape rewind and disk seek times

Yes, that's what I did too.

> are not remotely comparable, especially when you're talking about N tape
> units versus one disk unit --- using more files (tapes) to minimize
> rewind time can be a big win on tapes, but put those same files on a
> disk and you're just spreading the seek time around differently.  More
> to the point, though, tape-oriented algorithms tend to assume that tape
> space is free.  Polyphase merge doesn't care in the least that it has
> several copies of any given record laying about on different tapes, only
> one of which is of interest anymore.
> 
> I know how to get the sort space requirement down to 2x the actual data
> volume (just use a balanced merge instead of the "smarter" polyphase)
> but I am thinking about ways to get it down to data volume + a few
> percent with an extra layer of bookkeeping.  The trick is to release
> and recycle space as soon as we have read in the tuples stored in it...

The thing I liked about the existing algorithm is that it did the
sorting without the page faulting/thrashing caused by many sort
algorithms.  I can see better space reuse as being a big win because we
would get even less page faulting because the replaced page would
already be in memory.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



view thread (23+ messages)  latest in thread

Message-ID: <199910111507.LAA29115@candle.pha.pa.us>
Permalink:  ../199910111507.LAA29115@candle.pha.pa.us/
Also on:    postgresql.org/message-id/199910111507.LAA29115@candle.pha.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: maillist@candle.pha.pa.us, tgl@sss.pgh.pa.us, swheeler@sabre.com, pgsql-sql@hub.org
  Subject: Re: [SQL] Questions about vacuum analyze
  In-Reply-To: <199910111507.LAA29115@candle.pha.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox