Query is slow or timed out
First distinguish a query that is still running from one that has ended with a timeout or database error.
Symptoms
Section titled “Symptoms”With the default query timeout, TableAI can report:
Query cancelled: Execution exceeded 180 second timeoutThe server can also enforce its own statement or lock timeout. Keep its message and code when investigating the delay.
Quick checks when a query is slow or timed out
Section titled “Quick checks when a query is slow or timed out”- Check the execution status before starting another copy.
- Cancel work you no longer need with Query › Cancel Query (⌘.).
- Read any server error through database error codes.
- Check Settings › General › Query Timeout; its default is 180 seconds.
If the connection never opened, use connection failed.
Cancellation has not finished
Section titled “Cancellation has not finished”Use Force Stop Query only when normal cancellation does not resolve the operation.
For interrupted writes, confirm the database outcome before repeating the SQL. Cancellation or a timeout alone does not establish that a write was rolled back.
The query returns more data than needed
Section titled “The query returns more data than needed”Select only the columns and rows needed for a sample. Large values and broad result sets take time to read and transfer, even with a responsive grid.
Compare the smaller query with the original. If both wait before returning rows, investigate locks or the plan rather than increasing the result limit.
Another transaction holds a lock
Section titled “Another transaction holds a lock”Open Admin › Locks and Connections to inspect current waits. Follow connections and locks before ending another session.
A deadlock is different from a long wait. Use PostgreSQL 40P01, MySQL 1213, or SQLite database is locked for the reported error.
The execution plan or server needs attention
Section titled “The execution plan or server needs attention”Use diagnose performance to inspect the query plan and available server statistics. Plain EXPLAIN describes a plan without executing the statement.
Review a query before approving EXPLAIN ANALYZE. It executes the statement and can change data.
For local or Docker databases, check CPU, memory, disk, and container resource limits. For cloud databases, compare service resource use and server timeouts with the app setting. For a company server, ask the administrator to inspect load at the failure time.
Increase Query Timeout only after you establish that the intended operation needs more time. It does not remove a server timeout or lock.
Still stuck
Section titled “Still stuck”If statistics cannot load, use Admin Panel data unavailable. Include the duration, cancellation result, and error in a support report.