LogicTrail
  • Trails
  • Check my app
  • Pricing
  • Sign in
  1. Trails
  2. /
  3. Launch day
  4. · 4 minutes · Pro

Fast with 50 rows, slow with 20 million

Your orders page was instant in testing. Two years and 20 million orders later, it takes eight seconds to load.

This answers: Why did my database get slow as it grew? No coding needed. 2 quick decisions.

  • Where your data lives
  • Debugging without panic

Checking your access…

Why did my database get slow as it grew?

Usually because queries filter or sort on columns without an index, so the database reads every row. With little data this is instant; with hundreds of thousands of rows it is slow. Add on the columns you filter and sort by, especially foreign keys, and test with realistic data.

Trail of the bug
  1. Browser
  2. Your server
  3. Database

Breaks at Database: No index: reads every row

How it works

Rows read to show one customer's ordersAdd an index

20,000,000rows read

Each square stands for 100,000 rows.

Without an index, the database checks every row in the table to find the few that match.

Why AI tools write this bug

AI-generated schemas create tables and foreign keys but rarely the matching , and test data is too small to show the problem.

How to fix it

  1. Find slow queries in your database dashboard or advisor.

3 more steps, and a prompt that checks your own app for this bug. Part of Pro.

Unlock

Common questions

Should I index every column?
No. Indexes slow down writes and use storage. Index for the queries you run.

Related scenarios

  • Permission denied for tablePro · 4 min
  • 4am for a 10am bookingPro · 4 min
  • The webhook that arrived twicePro · 5 min

More on this trail

Launch day: Emails that never arrive, sign-in errors, timeouts, stale prices and connection limits.

Want someone to look?

We check AI-built apps for this and three other common leaks, in plain English.

Check my app
Sign in

Sign in to walk this one

2 decisions, about 4 minutes, and a prompt to check your own app for the same problem.

Sign in No password. We email you a link.

How to fix it

  1. Find slow queries in your database dashboard or advisor.

3 more steps, and a prompt that checks your own app for this bug. Part of Pro.

Unlock