# What will become expensive as the database grows?

Prompt · Performance and maintenance · PG14

Fact or history tables are growing fast, or you need to plan capacity.

## Prompt

```text
Use actual table sizes, row growth, query plans and workload patterns to identify the first database operations likely to become disproportionately expensive as data grows. Evaluate indexing, partitioning, pagination, aggregation and retention only where the evidence justifies them. Show what scale would trigger a change rather than optimizing everything prematurely.
```

**What it returns:** Current row counts and growth rates, the workload assumed, the size at which each operation becomes a bottleneck, and costs before and after at a realistic scale.

**Skip it when:** Data volume is small and flat.

**Avoid:** Partitioning or new layers without a measured or credible need.

**Tools:** Needs: read-only database access. Helps: query statistics (pg_stat_statements) and HypoPG.

**Works on:** Any PostgreSQL host: Supabase, Neon, RDS, Cloud SQL or self-hosted.

**Changes:** Changes nothing

**Sessions:** Look first, then fix in a new session

## Related

- [Queries that grow badly](https://atlasscope.dev/prompts/queries-that-grow-badly): Finds the database queries that will be the first to slow down as tables grow.
- [What breaks at ten times the size](https://atlasscope.dev/prompts/what-breaks-at-ten-times-the-size): Names the first thing to break if the project takes off, before it does.
- [Find the true sources of database waste](https://atlasscope.dev/prompts/find-the-true-sources-of-database-waste): The bill is high, CPU or disk usage is high, storage keeps growing, or you suspect bloat.

Source: https://atlasscope.dev/prompts/what-will-become-expensive-as-the-database-grows
