Every business has the goal of being successful. The consequence of having a successful business when there's a database involved is increasingly high volume. This volume can be composed of query activity, data accumulation, or both. A PostgreSQL database that is not prepared for vast amounts of data or a huge transaction load will slowly falter until the platform suffers.
Customers notice bad performance just as readily as outages. If our database is struggling to service queries, we have three options:
- Spend time optimizing the platform to reduce database interaction
- Buy a more capable database server
- Store data on several PostgreSQL servers
Indeed, we should probably always implement step one in any case. Yet, there is a limit to candidates for optimization. If the platform is using an ORM (Object-relational Mapping), making query changes can be difficult because they are generated from the framework. Frontend caching can prevent a vast amount of database accesses, but we need...