Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(redshift): support configurable SORTKEY and DISTKEY in tables #17125

Closed
1 of 2 tasks
ryparker opened this issue Oct 22, 2021 · 2 comments · Fixed by #17135
Closed
1 of 2 tasks

(redshift): support configurable SORTKEY and DISTKEY in tables #17125

ryparker opened this issue Oct 22, 2021 · 2 comments · Fixed by #17135
Labels
@aws-cdk/aws-redshift Related to Amazon Redshift effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p1

Comments

@ryparker
Copy link
Contributor

ryparker commented Oct 22, 2021

Description

As a Redshift user.
I'd like to be able to define a DISTKEY and SORTKEY in my tables.
So that I can optimize my table query performance.

Use Case

Say I have a table with many rows (200 million+) with a query time of 20 seconds, I'd like to improve query times by optimizing the tables to better suit the shape of my data and common queries.

Proposed Solution

Add support for configuring a sortKey and distKey prop in the Redshift Table construct.

Other information

It looks like Redshift Tables are created via API instead of a typical CFN resource:

Create a table within a Redshift cluster database by instantiating a Table construct. This will make a query to the Redshift cluster to create a new database table with the supplied schema.
CDK Redshift table overview docs

This means escape hatches are not a viable workaround.

Acknowledge

  • I may be able to implement this feature request
  • This feature might incur a breaking change
@ryparker ryparker added p1 feature-request A feature should be added or improved. effort/medium Medium work item – several days of effort @aws-cdk/aws-redshift Related to Amazon Redshift labels Oct 22, 2021
@ryparker
Copy link
Contributor Author

Related SIM ticket: V453334513

@njlynch njlynch removed their assignment Oct 28, 2021
@mergify mergify bot closed this as completed in #17135 Nov 11, 2021
mergify bot pushed a commit that referenced this issue Nov 11, 2021
…tKey to Table (#17135)

feat(redshift): Add support for distStyle, distKey, sortStyle and sortKey to Table

closes #17125 

Ref:
1. https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_TABLE_NEW.html
2. https://docs.aws.amazon.com/redshift/latest/dg/r_ALTER_TABLE.html

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this issue Feb 21, 2022
…tKey to Table (aws#17135)

feat(redshift): Add support for distStyle, distKey, sortStyle and sortKey to Table

closes aws#17125 

Ref:
1. https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_TABLE_NEW.html
2. https://docs.aws.amazon.com/redshift/latest/dg/r_ALTER_TABLE.html

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-redshift Related to Amazon Redshift effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants