postgresql_management

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
postgresql_management [2024/07/18 04:40] – [VACUUMING] andonovjpostgresql_management [2024/07/18 04:41] (current) – [VACUUMING] andonovj
Line 467: Line 467:
  
 =====VACUUMING===== =====VACUUMING=====
-VACUUM Tips and Best Practices 
-Tried and tested tips and best practices for PostgreSQL vacuuming 
 Vacuuming should be part of routine database maintenance, and there are optimal ways to go about it. Below are some performance tips for PostgreSQL vacuuming. Vacuuming should be part of routine database maintenance, and there are optimal ways to go about it. Below are some performance tips for PostgreSQL vacuuming.
 Don’t run manual VACUUM or ANALYZE without reason. Don’t run manual VACUUM or ANALYZE without reason.
Line 523: Line 521:
 The code snippet below shows how to configure individual tables. The code snippet below shows how to configure individual tables.
  
-ALTER TABLE <table_name> SET (autovacuum_vacuum_cost_limit = <large_value>+  * ALTER TABLE <table_name> SET (autovacuum_vacuum_cost_limit = <large_value>
-ALTER TABLE <table_name> SET (autovacuum_vacuum_cost_delay = <lower_cost_delay>)+  ALTER TABLE <table_name> SET (autovacuum_vacuum_cost_delay = <lower_cost_delay>) 
 Using the first parameter will ensure the autovacuum thread assigned to the table performs more work before going to sleep. Lowering the autovacuum_vacuum_cost_delay will also mean the thread sleeps for less time. Using the first parameter will ensure the autovacuum thread assigned to the table performs more work before going to sleep. Lowering the autovacuum_vacuum_cost_delay will also mean the thread sleeps for less time.
 Get more best practice tips from our professional team of PostgreSQL experts: Get more best practice tips from our professional team of PostgreSQL experts:
  
 ===Examples=== ===Examples===
  • postgresql_management.1721277635.txt.gz
  • Last modified: 2024/07/18 04:40
  • by andonovj