Adobe Commerce Intelligence: resolve SQL EXPLAIN cost errors
You might receive an EXPLAIN cost error when running SQL queries in Adobe Commerce Intelligence. This happens when a query is deemed too expensive to run or returns too many results. Use these solutions to resolve the error and get your query running.
Description description
Environment
Adobe Commerce Intelligence
Issue/Symptoms
Here are the messages you might see and their meaning:
- Unable to execute query. The
EXPLAINcost value of[xxx]is too high to run this query. If you see this message, it means that the query was deemed too expensive to execute. - Unable to execute query. This query returns
[xxx]rows, which exceeds our limit of 10,000. In this case, the possible number of results exceeds the set maximum for the SQL Report Builder. - Unable to parse
EXPLAINresponse. This message means something probably went wrong on our end.
Resolution resolution
For queries with a high EXPLAIN cost:
- Eliminate any
ORDER BYclauses from your query, as they’re costly operations. - Follow the tips in our optimization article to tweak your query.
To reduce the number of results:
- Try adding some filters to your query.
- Use
LIMIT, if you can. Some tables have a large number of rows and limiting the results can keep you under the row limit.
If you continue to receive the EXPLAIN response parsing error, please reach out to support.
experience-cloud-kcs-help-kbarticles