Shrinking Big PostgreSQL tables: Copy-Swap-Drop
20-Sep-2024 397
While PostgreSQL supports tables up to 32TB in size, working with large tables of 500GB or more can be problematic and slow.Query performance can be poor, adding indexes or constraints is slow. Backup and restore operations slow down due to these large tables.Large tables might force a need to scale the database server instance vertically to provision more CPU and memory capacity unnecessarily, when only more storage is needed.When the application queries only a portion of the rows, such as recent rows, or rows for active users or customers, there’s an opportunity here to move the unneeded rows out of Postgres.
Shrinking Big PostgreSQL tables: Copy-Swap-Drop #ruby #rubydeveloper #rubyonrails #Shrinking #PostgreSQL #tables: #Copy-Swap-Drop https://rubyonrails.ba/link/shrinking-big-postgresql-tables-copy-swap-drop