Re: Truncating table in PSQL reclaims hard disk?

Поиск
Список
Период
Сортировка
От s d
Тема Re: Truncating table in PSQL reclaims hard disk?
Дата
Msg-id CAKyoTgbhKDDAfecyxvBgOGaGaaYfPRP+a8xAprx6NK-N1PNR7g@mail.gmail.com
обсуждение исходный текст
Ответ на Truncating table in PSQL reclaims hard disk?  (Freeda Suing <freeda.suing@gmail.com>)
Список pgsql-novice


On 24 August 2015 at 13:07, Freeda Suing <freeda.suing@gmail.com> wrote:
Hi,

Does truncating a table automatically re-claim the hard disk or do I need to initiate vacuum after the truncate.

Thanks

TRUNCATE quickly removes all rows from a set of tables. It has the same effect as an unqualified DELETE on each table, but since it does not actually scan the tables it is faster. Furthermore, it reclaims disk space immediately, rather than requiring a subsequent VACUUM operation. This is most useful on large tables.

Regards,
Sandor

В списке pgsql-novice по дате отправления:

Предыдущее
От: Freeda Suing
Дата:
Сообщение: Truncating table in PSQL reclaims hard disk?
Следующее
От: Daniel Smedegaard Buus
Дата:
Сообщение: Triggers on replicated (BDR) data