Think Build Implement Repeat
London, UK +44 7367 067226
WhatsApp FOLLOW f in X
PHP Development

What Happens When Usage Grows

Last updated:

The database first, always

Business applications rarely become slow because PHP cannot keep up. They become slow because query count grows with data volume, or because an index that was unnecessary at ten thousand rows is essential at a million.

Adding application servers in front of a database that is the bottleneck makes the bottleneck worse, not better.

The order of work

  1. Fix query multiplication — loops issuing one query per row
  2. Add missing indexes on filtered and joined columns
  3. Move reporting to a replica or a nightly copy
  4. Cache what remains genuinely expensive
  5. Then add capacity, if it is still needed

Watch data volume, not user count

  • A query that scans a table gets slower as the table grows
  • Reports over all history get slower every month
  • Log and audit tables grow indefinitely unless managed
  • Search over free text degrades without proper indexing

Applications frequently slow down with no change in usage, purely because the data has grown past what the original queries assumed.

Archive old data

Most business applications keep everything forever because nobody decided otherwise. Moving old records to an archive table or a separate store keeps the working set small and the queries fast.

It also makes backups faster and restores quicker, which matters more than it sounds during an incident.

Then horizontal capacity

StepWhen
Bigger serverSimplest, works for a long time
Read replicaReporting and read-heavy load
Multiple application serversConcurrency limits reached
Separate queue workersBackground work competing with web
ShardingRarely, and it is a large step

Frequently asked questions

How many users can a PHP application handle?

With sensible queries, far more than most businesses have. Concurrency is rarely the constraint at business scale.

Should we move to the cloud to scale?

It makes adding capacity easier and does not fix a query problem. Fix the queries first.

When should we consider a read replica?

When reporting queries are affecting the application. That is usually the first genuine architectural step.

What about archiving?

Worth doing once tables reach millions of rows, particularly logs and audit records. It is frequently the cheapest performance improvement available.

Keep reading

Application getting slower as data grows?

That is a query and index problem, not a capacity one. Happy to find where the time goes.

Book a free 30-minute call Get a project estimate WhatsApp us

Related services

What we build for problems like this one

Web DevelopmentCustom Software Development