Warning
Error Code: 3125

MySQL Error 3125: MAX_EXECUTION_TIME Hint Placement

📦 MySQL
📋

Description

MySQL Error 3125 indicates that the `MAX_EXECUTION_TIME` hint, which limits query execution duration, has been used in an unsupported context. This error typically occurs when the hint is not applied to a top-level, standalone `SELECT` statement.
💬

Error Message

MAX_EXECUTION_TIME hint is supported by top-level standalone SELECT statements only
🔍

Known Causes

3 known causes
⚠️
Hint in Subquery or Derived Table
The `MAX_EXECUTION_TIME` hint was placed within a subquery, derived table, or common table expression (CTE), rather than on the outermost `SELECT` statement.
⚠️
Non-Standalone SELECT Statement
The hint was used on a `SELECT` statement that is part of a larger DML operation (e.g., `INSERT INTO ... SELECT`) or a `UNION` clause where it's not the final, top-level `SELECT`.
⚠️
Incorrect Statement Type
The `MAX_EXECUTION_TIME` hint was mistakenly applied to a non-`SELECT` statement, such as `UPDATE`, `DELETE`, or `INSERT`.
🛠️

Solutions

Coming Soon

Detailed step-by-step solutions for this error are being prepared. In the meantime, try these general troubleshooting tips:

General Troubleshooting Tips

  • Check the error message carefully for specific details
  • Review recent changes that might have caused the error
  • Search for the exact error code in the official documentation
  • Check log files for additional context
  • Try restarting the application or service
🔗

Related Errors

5 related errors