Think Build Implement Repeat
London, UK +44 7367 067226
WhatsApp FOLLOW f in X
  1. Home
  2. Blog
  3. What Happens When Usage Grows
PHP Development

What Happens When Usage Grows

Scaling a PHP business application: why the database is the first constraint, fixing queries and indexes, archiving old data, and only then more servers.

Updated 2 min readBy SpiderHunts Technologies

Free estimateNo obligation

Get a free estimate

Tell us what you need. A senior engineer reads every enquiry.

Takes under a minute. We never share your details.

  • Free consultation
  • No commitment
  • NDA on request

Prefer to talk? Book a free 30-minute call →

Quick answer — TL;DR

The database is nearly always the first constraint. Fix queries, add indexes, move reporting off the primary, then consider more servers — in that order.

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

FAQ

Frequently asked questions

The questions readers ask us after this guide.

Still have a question?

Ask us directly — a senior engineer will get back to you.

Ask about your project

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

More on PHP Development

PHP Development

Why PHP Is Still a Sensible Choice

Is PHP still a good choice for business applications? Where modern, typed PHP fits, where another language is better, and the hosting and hiring arguments.

PHP Development

Improving Old Code Without a Rewrite

Modernising a legacy PHP application without a rewrite: move to a supported PHP version, add tests around what matters, then strangle rather than replace.

Start here

Application getting slower as data grows?

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

  1. You tell us what you needTwo minutes on the form, or a message on WhatsApp.
  2. A senior engineer reviews itAnd comes back with questions, a realistic range and an honest view on fit.
  3. Free 30-minute scoping callWe talk through scope, options and a realistic estimate — with no obligation.
Free estimateNo obligation

Talk to someone who builds this

Send a short brief and we will come back with an honest view and a realistic range.

Takes under a minute. We never share your details.

  • Free consultation
  • No commitment
  • NDA on request

Prefer to talk? Book a free 30-minute call →