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,710 points
1,159 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
• 58,100 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, 2020 in AWS by MD
• 95,460 points
1,630 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
11,740 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
• 58,100 points
1,269 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
• 58,100 points
10,767 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,170 points
746 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,170 points
1,375 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP