The Prompt BakeryTemplates and prompts

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)

  1. 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

  1. Find the slow query and show its plan (explain analyze) on a test copy.
  2. Add the missing index for the filter or sort columns via a migration, with a rollback.
  3. 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.

Related

Try another entry

How can we help?

What do you need?
Your email, so we can reply (optional)Only enter your own email. We reply there.