Fast on your laptop, four seconds in production
A lookup by email is instant against the 500 rows in your development database and takes four seconds against the 12 million in production. The query text is identical.
Without an index there is nothing the database can do except read every row and compare — and that cost grows with the table while your test data stays small.
Add what turns a full scan into a direct lookup.
Components — tap one, then tap a slot on the diagram
!This query reads all twelve million rows. Every time.
Outside every boundary: App (WHERE email = ?), users (12M rows; FAILED: full scan), an empty slot for the what the planner needs Connections: App calls what the planner needs (step 1) what the planner needs calls users — direct lookup (step 2)
AppWHERE email = ?
users12M rowsfull scan