Distribution Keys vs. Sort Keys
Start course

Amazon Redshift is a cloud-native data warehouse from AWS. It has a Massively Parallel Processing framework that automatically distributes data and the query load across every node available in a cluster. This course explains how Redshift distributes table data, how keys are used inside tables, and the importance of distribution styles.

Learning Objectives

  • Understand the key concepts of data distribution
  • Learn about the three types of distribution styles
  • Understand the difference between distribution keys and sort keys

Intended Audience

This course is intended for database administrators or anyone who wants to enhance their knowledge of Amazon Redshift.


To get the most from this course, you should have a basic understanding of Amazon Redshift.


A distribution key is used to determine where data is stored on the compute nodes.

Do not confuse distribution styles with sort keys.  Sort keys in Redshift determine the order in which rows are stored in a table.  Distribution styles are how Redshift stores data in each node.

While sort keys are out of the scope of this course, like distribution keys, they do impact performance.

I think of it this way, sort keys allow Redshift to skip unneeded data during query processing.  Having less data to scan means that there is a shorter processing time and results are returned faster.

Amazon Redshift support two types of sort keys: Compound Sort Keys and Interleaved Sort Keys.

Consult the documentation for more details.

About the Author
Learning Paths

Stephen is the AWS Certification Specialist at Cloud Academy. His content focuses heavily on topics related to certification on Amazon Web Services technologies. He loves teaching and believes that there are no shortcuts to certification but it is possible to find the right path and course of study.

Stephen has worked in IT for over 25 years in roles ranging from tech support to systems engineering. At one point, he taught computer network technology at a community college in Washington state.

Before coming to Cloud Academy, Stephen worked as a trainer and curriculum developer at AWS and brings a wealth of knowledge and experience in cloud technologies.

In his spare time, Stephen enjoys reading, sudoku, gaming, and modern square dancing.