Re: CLUSTER vs. VACUUM FULL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: CLUSTER vs. VACUUM FULL
Date: 2024-04-21 22:45:14
Message-ID: 2870091.1713739514@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ron Johnson <ronljohnsonjr(at)gmail(dot)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.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2024-04-22 00:06:52 Re: CLUSTER vs. VACUUM FULL
Previous Message Ron Johnson 2024-04-21 22:07:50 CLUSTER vs. VACUUM FULL