public inbox for [email protected]  
help / color / mirror / Atom feed
From: Ron Johnson <[email protected]>
To: pgsql-general <[email protected]>
Subject: Re: CLUSTER vs. VACUUM FULL
Date: Sun, 21 Apr 2024 20:06:52 -0400
Message-ID: <CANzqJaAj9TRMKOwOv9pNjf7n5+e0bbd8ERZB2Zb8sdazVRmRwg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CANzqJaD8o0UuK42F==BXZA=L380n=aXt+VJ93PN3waFbNhZHBg@mail.gmail.com>
	<[email protected]>

On Sun, Apr 21, 2024 at 6:45 PM Tom Lane <[email protected]> wrote:

> Ron Johnson <[email protected]> writes:
> > Why is VACUUM FULL recommended for compressing a table, when CLUSTER does
> > the same thing (similarly doubling disk space), and apparently runs just
> as
> > fast?
>
> CLUSTER makes the additional effort to sort the data per the ordering
> of the specified index.  I'm surprised that's not noticeable in your
> test case.
>

It's in a freshly restored database.  However, regular deletions of old
records, and normal vacuums would have led me to expect that the "fresh"
public.log would have been in relatively random order.


view thread (20+ messages)  latest in thread

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: [email protected]
  Cc: [email protected]
  Subject: Re: CLUSTER vs. VACUUM FULL
  In-Reply-To: <CANzqJaAj9TRMKOwOv9pNjf7n5+e0bbd8ERZB2Zb8sdazVRmRwg@mail.gmail.com>

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

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