13 Ekim 2019 Pazar

VACUUMLO Komutu

Giriş
psql.exe gibi harici bir komuttur. Açıklaması şöyle.
PostgreSQL VACUUM is a technique to remove tuples that have been deleted or are now obsolete from their table to reclaim storage occupied by those dead tuples, also known as Bloat. VACUUM is an important process to maintain, especially for frequently-updated tables before it starts affecting your PostgreSQL performance.
VACUUM için 2 seçenek var.

1. Auto Vacuum
Açıklaması şöyle.
The most popular process for PostgreSQL VACUUM is the built-in autovacuum,... . The autovacuum daemon is optional, but highly recommended in the PostgreSQL community, at it automates both VACUUM and ANALYZE commands, continuously checking tables for deal tuples. 
Auto Vacuum'un bazı dezavantajları var. Açıklaması şöyle.
 - autovacuum may run even when turned off to deal with transaction ID wraparound.
- autovacuum is constantly running, which makes it start over every time it runs out of space, and start a new worker for each database in your cluster.
- autovacuum can cause out of memory errors.
- autovacuum may have trouble keeping up on a busy server.
- autovacuum can easily consume too much I/O capacity.
2. Manual Vacuum
Örnek
Şöyle yaparız.
vacuumlo -h <hostname> -U <username> -W -v <database_name>

Hiç yorum yok:

Yorum Gönder