VACUUM vs VACUUM FULL (was: SELECT * FROM huge_table LIMIT 10; Why does it take more than 10 min to complete, with cold caches)

From: Dimitrios Apostolou <jimis(at)gmx(dot)net>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: VACUUM vs VACUUM FULL (was: SELECT * FROM huge_table LIMIT 10; Why does it take more than 10 min to complete, with cold caches)
Date: 2023-02-01 18:27:34
Message-ID: 0c18ab4b-b8fd-ac03-2118-066fe0362246@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks everyone for the help.

I have now run simple VACUUM but it didn't change anything, the simple
SELECT is still slow.

My understanding by reading the docs is that it should reclaim all unused
space, just not return it to the OS. Which is fine by me. Any idea why it
failed to reclaim the space in my case?

I'm now running VACUUM FULL as everyone suggested. I just tried plain
VACUUM as I was curious if it would work and because it doesn't lock
the table with an operation that takes hours for my setup.

Thanks,
Dimitris

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message veem v 2023-02-01 18:34:23 Re: Sequence vs UUID
Previous Message David G. Johnston 2023-02-01 18:26:12 Re: SELECT * FROM huge_table LIMIT 10; Why does it take more than 10 min to complete, with cold caches