This article provides solutions for EXPLAIN cost errors when running unsuccessful SQL queries. PostgreSQL uses something called the EXPLAIN command to determine the cost of SQL queries. We built the SQL Report Builder to also use this command, meaning that if the cost is deemed to be too high - the amount of resources required to execute the query exceeds our thresholds - the query won’t run and an EXPLAIN message will display.
There are a few reasons why this might happen. Here are the messages you might receive, what they mean, and how to troubleshoot them.
If you see this message, it means that the query was deemed too expensive to execute. We have two recommendations for this situation: one is to eliminate any ORDER BY clauses from your query, as they’re costly operations. The second is to follow the tips in our optimization article to tweak your query.
In this case, the possible number of results exceeds the set maximum for the SQL Report Builder. There are a few ways you can reduce the number of results:
Whoops. This message typically means something probably went wrong on our end. If you continue to receive this error, please reach out to support.