Redshift
18 questionsDistribution keys, sort keys, query optimization, Redshift Spectrum, and cluster management.
DISTKEY Selection Strategy
You're designing a Redshift schema for an e-commerce analytics platform. The main fact table is `orders` (500M rows) frequently joined with `customers` (5M rows). How do you choose distribution keys?
Compound vs Interleaved Sort Keys
Your Redshift table is queried with different filter patterns: sometimes by date, sometimes by region, sometimes by both. The compound sort key on (date, region) helps date queries but not region-only queries. What are your options?
EXPLAIN Plan Analysis
A Redshift query takes 45 minutes. You run EXPLAIN and see a `DS_BCAST_INNER` step with high cost. What does this mean and how do you fix it?
VACUUM and ANALYZE Strategy
After weeks of daily incremental loads and deletes, your Redshift queries are getting slower. What's happening and how do you fix it?
WLM Queue Configuration
Your Redshift cluster serves both BI dashboards (short queries, high concurrency) and data science teams (long, heavy queries). Dashboard users complain about slow response times when data science runs large queries. How do you fix this?
COPY Command Optimization
You're loading 100GB of data from S3 into Redshift daily. The COPY command takes over an hour. How do you optimize it?
Materialized Views
Your BI team runs the same expensive aggregation query hundreds of times per day with slight filter variations. How do you optimize this with Redshift features?
Redshift Spectrum Architecture
Your team stores historical data (5 years, 50TB) in S3 and recent data (3 months, 2TB) in Redshift. How do you query across both seamlessly?
RA3 vs DC2 Node Types
Your team is migrating from DC2 to RA3 nodes. What are the key differences and what should you watch out for?
Redshift Serverless vs Provisioned
A startup is evaluating Redshift for their analytics. They have unpredictable query patterns — heavy during business hours, nearly idle at night. Which deployment model do you recommend?
Encoding and Compression
You notice your Redshift tables are using more storage than expected. How do you choose the right column encoding?
UNLOAD to S3
You need to export query results from Redshift to S3 for consumption by Spark jobs. What's the best approach?
Late-Binding Views for Schema Flexibility
You're building views over Spectrum external tables, but they break whenever the upstream schema changes. How do you handle this?
Concurrency Scaling
During peak hours, your Redshift cluster queues dozens of queries. Users complain about wait times. How does concurrency scaling help and what are the limitations?
Cross-Region Data Sharing
Your company has Redshift clusters in us-east-1 and eu-west-1. European analysts need access to US data for global reporting. What are the options?
Redshift ML Integration
Your analytics team wants to run customer churn predictions directly in Redshift without exporting data to SageMaker. Is this possible and when does it make sense?
Query Performance Debugging
A query that used to run in 5 seconds now takes 5 minutes. Nothing changed in the query itself. How do you debug this?
Data Distribution Skew Diagnosis
After choosing customer_id as DISTKEY, some queries are fast but others are extremely slow. Profiling shows some nodes finish in seconds while others take minutes. What's happening?