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,670 points
21 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
• 56,520 points

Related Questions In AWS

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 in AWS by athenauserz
937 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 in AWS by Priyaj
• 56,520 points
40 views
0 votes
1 answer
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
• 56,520 points
1,589 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,090 points
22 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,090 points
29 views
0 votes
1 answer