From: | Ron Johnson <ronljohnsonjr(at)gmail(dot)com> |
---|---|
To: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: CLUSTER vs. VACUUM FULL |
Date: | 2024-04-22 00:06:52 |
Message-ID: | CANzqJaAj9TRMKOwOv9pNjf7n5+e0bbd8ERZB2Zb8sdazVRmRwg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sun, Apr 21, 2024 at 6:45 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> 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.
>
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Ron Johnson | 2024-04-22 00:15:48 | Re: CLUSTER vs. VACUUM FULL |
Previous Message | Tom Lane | 2024-04-21 22:45:14 | Re: CLUSTER vs. VACUUM FULL |