# Amazon Redshift

> Go deep on Redshift: provisioned and serverless options, distribution and sort keys, COPY from S3, Spectrum and workload management. Free notes, key concepts,...

Canonical: https://www.internhack.in/roadmaps/tracks/data-engineer/redshift
Last updated: 2026-11-28

Go deep on Redshift: provisioned and serverless options, distribution and sort keys, COPY from S3, Spectrum and workload management.

Intermediate · about 8 hours · difficulty 3/5

Learn first: [How Cloud Data Warehouses Work](https://www.internhack.in/roadmaps/tracks/data-engineer/warehouse-concepts)

Amazon Redshift is AWS's data warehouse and is common in companies already built on AWS. Pick it if your target roles are AWS-heavy.

### Deployment options

- **Provisioned clusters** with RA3 nodes (managed storage separate from compute).
- **Redshift Serverless**: pay for compute used, no cluster sizing. Easier for learning; check the free trial credits.

### Table design matters more here

- **Distribution style** decides how rows spread across nodes: `KEY` (co-locate rows with the same join key), `ALL` (copy small dimensions to every node), `EVEN`, or `AUTO`.
- **Sort keys** order data on disk so range filters skip blocks (zone maps).
- Good choices avoid data movement during joins; poor ones cause slow, shuffle-heavy queries.
- Recent versions automate much of this (`AUTO` distribution and sort), but interviewers still ask.

### Loading and querying

- `COPY` from S3 in parallel; split input into multiple files.
- **Redshift Spectrum** queries Parquet in S3 directly through the Glue Data Catalog.
- `VACUUM` and `ANALYZE` maintain sort order and statistics (largely automatic now).
- **Workload management (WLM)** and concurrency scaling manage many simultaneous queries.

### Pitfalls

- Choosing a distribution key with skewed values, putting most data on one node.
- Loading with many single-row INSERTs instead of COPY.

You are ready to move on when you can design distribution and sort keys for a fact and two dimensions, load them with COPY from S3, and use EXPLAIN to confirm joins avoid redistribution.

## Key concepts

- **Provisioned vs Serverless**
- **Distribution styles**
- **Sort keys and zone maps**
- **COPY from S3**
- **Redshift Spectrum**
- **VACUUM and ANALYZE**
- **Workload management**

## Other options for this step

- [Snowflake](https://www.internhack.in/roadmaps/tracks/data-engineer/snowflake): Go deep on Snowflake: virtual warehouses, micro-partitions, stages and COPY, time travel, zero-copy cloning, roles and cost controls.
- [Google BigQuery](https://www.internhack.in/roadmaps/tracks/data-engineer/bigquery): Go deep on BigQuery: serverless execution, slots and bytes-scanned pricing, partitioning and clustering, nested and repeated fields, and cost controls.

## Mini project

Using Redshift Serverless trial credits, load a star schema from S3 with COPY. Try two distribution designs for the fact table, run the same join query and compare EXPLAIN plans and runtimes. Pause or delete resources afterwards.

## Check yourself

Why would you use DISTSTYLE ALL for a small city dimension but not for the orders fact table?

## Free resources

- [Amazon Redshift documentation](https://docs.aws.amazon.com/redshift/) (AWS)
- [AWS Skill Builder](https://skillbuilder.aws/) (AWS)

Previous: [Google BigQuery](https://www.internhack.in/roadmaps/tracks/data-engineer/bigquery) · Next: [Lakehouse Tables with Delta Lake](https://www.internhack.in/roadmaps/tracks/data-engineer/delta-lake)

## More in Cloud Warehouses and Lakehouses

- [How Cloud Data Warehouses Work](https://www.internhack.in/roadmaps/tracks/data-engineer/warehouse-concepts)
- [Snowflake](https://www.internhack.in/roadmaps/tracks/data-engineer/snowflake)
- [Google BigQuery](https://www.internhack.in/roadmaps/tracks/data-engineer/bigquery)
- [Amazon Redshift](https://www.internhack.in/roadmaps/tracks/data-engineer/redshift)
- [Lakehouse Tables with Delta Lake](https://www.internhack.in/roadmaps/tracks/data-engineer/delta-lake)
- [Lakehouse Tables with Apache Iceberg](https://www.internhack.in/roadmaps/tracks/data-engineer/iceberg)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Data Engineer Roadmap](https://www.internhack.in/roadmaps/tracks/data-engineer)
