Fix · Supabase and databases
Query timeout: canceling statement due to statement timeout
Not checked against the vendor's current screens
What you may see
- A list or report page is slow and then fails
Most likely cause
The query reads too many rows or has no helpful index, so the database stops it after its time limit.
Check first (about two minutes)
- Run the same query in the SQL editor: how long does it take and how many rows?
The fix prompt
What you type here never leaves your browser. The search runs on this page, and nothing is sent to a server or to an AI.
Kept only in this browser, on this device. Keys and passwords are removed before anything is saved.
Prompt language
Paste it into Claude, ChatGPT, Gemini or Cursor, then follow what it says.
After you tried it, did it work?
Steps
- Find the slow query and show its plan (explain analyze) on a test copy.
- Add the missing index for the filter or sort columns via a migration, with a rollback.
- Fetch less: choose only needed columns, add paging, avoid selecting everything.
Do not do this
- Do not create indexes on every column.
- Do not raise the timeout as the only fix.