Closed denis-stepanov closed 1 year ago
Maybe a better alternative would be to turn on and tune the 'autovacuum' feature of Postgres.
It turns out that "autovacuum" is already turned on by default, but it kick in whenever PostgreSQL sees fit, and not necessarily by the end of data modifications. So the vacuum command would still make sense.
An optional -f
parameter could perform VACUUM FULL
.
The database of fingerprints even of a modest size can easily have hundreds of thousands of entries. They are intensively queried by parallel threads. It is thus important to keep database small and clean to the extent possible. Manipulating database like pulling an update contributes to buildup of junk which can be removed by PostgreSQL
VACUUM
command. Experience shows that it may significantly improve performance. It is thus suggested to add its support to the database service tool.