O'Reilly logo

Getting Started with Amazon Redshift by Stefan Bauer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sort keys

Now that we have talked about the lack of indexes, and the fact that there is no need to worry about indexing strategies, I will take part of that back, as you do need to think about how your data will most likely be accessed. The sort key can be between 1 and 400 columns. Before you dump a bunch of things into the sort key, understand that those columns that you put into the sort key are building a compound key, not a set of individual sorts on individual columns. Data, when loaded to your tables, will be sorted based on the column(s) that you have in your sort key. This will have a tremendous effect on your query performance. Think of this as the indexing strategy for Redshift. As columns are joined between tables, if the data is already ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required