AWS Redshift failed to make a valid plan when trying to run a complicated query

0 votes

I'm running a complicated query against a Redshift cluster in which there are 4 tables used with some of them have billions of rows, and I get the following error:

failed to make a valid plan

If I limit the data, the query will run successfully.

Oct 3, 2018 in AWS by eatcodesleeprepeat
• 4,750 points
108 views

1 answer to this question.

0 votes
-The Original query was an Oracle query which I've made some modifications on it, and data loaded in the tables in Redshift was also exported from Oracle.

-The query has a lot of JOINs and sub queries.

With those being said, going through the sub-queries one at a time, one of them didn't return any results, and that was the cause of this error in my case.

Fixing that particular sub-query and the main query accordingly, it worked successfully.
answered Oct 3, 2018 by Priyaj
• 57,700 points

Related Questions In AWS

0 votes
1 answer

"access denied" error when trying to move a file into the AWS server.

Hi@akhtar, I think you are trying to transfer file to ...READ MORE

answered Apr 2 in AWS by MD
• 79,930 points
250 views
0 votes
2 answers

How to skip headers when reading a CSV file in S3 and creating a table in AWS Athena?

Thanks for the answer. This should be clear ...READ MORE

answered Aug 14, 2019 in AWS by athenauserz
4,557 views
0 votes
1 answer

How to make a subnet public using AWS Console?

To make a subnet public you need ...READ MORE

answered Feb 11, 2019 in AWS by Priyaj
• 57,700 points
226 views
0 votes
1 answer

Error in Adding LIMIT fixes “Invalid digit, Value N” in Amazon Redshift.

This could be expressed simply as: SELECT TOP ...READ MORE

answered Sep 4, 2018 in AWS by Priyaj
• 57,700 points
5,479 views
0 votes
1 answer

Scaling in Amazon Redshift

The existing data warehouse cluster remains available ...READ MORE

answered Sep 27, 2018 in AWS by Archana
• 4,150 points
83 views
0 votes
1 answer

Single-Node Cluster & Multiple-Node Cluster

In the single-node cluster, you have a ...READ MORE

answered Sep 27, 2018 in AWS by Archana
• 4,150 points
166 views
0 votes
1 answer