Re: CLUSTER vs. VACUUM FULL - Mailing list pgsql-general

From Ron Johnson
Subject Re: CLUSTER vs. VACUUM FULL
Date
Msg-id CANzqJaBvcGKdhqaZz+b0jNc8WLK74UCDW+zk=Ja78duOjWUBRA@mail.gmail.com
Whole thread Raw
In response to Re: CLUSTER vs. VACUUM FULL  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: CLUSTER vs. VACUUM FULL
List pgsql-general
On Sun, Apr 21, 2024 at 6:45 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Ron Johnson <ronljohnsonjr@gmail.com> 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.

Clustering on a completely different index  was also 44 seconds.

pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: CLUSTER vs. VACUUM FULL
Next
From: Adrian Klaver
Date:
Subject: Re: error in trigger creation