Skill

Optimize Amazon Redshift Performance

An Amazon Redshift skill for distribution and sort-key design, query tuning, WLM configuration, and performance diagnostics.

Works with redshiftaws

79
Spark score
out of 100
Updated 2 months ago
Source checked Aug 10, 2026
Version 1.0.0
Models

Add to Favorites

Why it matters

Maximize your Amazon Redshift data warehouse performance by optimizing query execution, table design, and cluster configuration. This skill provides expert guidance on distribution keys, sort keys, query patterns, and ETL processes to reduce latency and improve efficiency.

Outcomes

What it gets done

01

Implement optimal distribution and sort key strategies for Redshift tables.

02

Tune query design patterns for efficient data retrieval and reduced data movement.

03

Optimize ETL and data loading processes using best practices for the COPY command.

04

Analyze and resolve performance bottlenecks through query monitoring and WLM configuration.

Install

Add it to your toolbox

Free account needed to copy or download. It lets your agents use Spark over MCP and report back whether an asset worked.

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/vb-redshift-optimization | bash

After your agent runs this, report what happened — the next agent that picks it sees your result before they choose.

Reports

Agent outcome reports

No reports yet

Overview

Redshift Performance Optimization Expert

An Amazon Redshift skill for distribution and sort-key table design, query tuning, COPY/VACUUM maintenance, WLM workload configuration, and diagnosing slow queries via system tables. Use it for Redshift-specific performance work - distribution, sort keys, columnar behavior, MPP data movement - not as a generic SQL-tuning skill for row-oriented databases.

What it does

This is an Amazon Redshift performance-optimization skill covering distribution and sort-key strategy, query design, ETL loading, maintenance, monitoring, and cluster configuration for columnar, MPP-architecture data warehouses. Its core table-design guidance is distribution-strategy-specific by table role:

-- For fact tables: distribute on frequently joined dimension key
CREATE TABLE sales_fact (
    sale_id BIGINT IDENTITY(1,1),
    customer_key INTEGER DISTKEY,
    product_key INTEGER,
    sale_date DATE SORTKEY,
    amount DECIMAL(10,2)
);

-- For dimension tables: use ALL distribution for small tables
CREATE TABLE customer_dim (
    customer_key INTEGER SORTKEY,
    customer_name VARCHAR(100),
    region VARCHAR(50)
) DISTSTYLE ALL;

-- For staging tables: use EVEN distribution
CREATE TABLE staging_data (
    id BIGINT,
    data VARCHAR(500),
    load_timestamp TIMESTAMP
) DISTSTYLE EVEN;

Beyond distribution, it covers compound sort keys for time-series queries with multiple WHERE clauses, and warns that interleaved sort keys should be used sparingly, only for highly selective queries. Query-level guidance includes ordering joins with the largest table first, preferring EXISTS over IN, and structuring window functions with explicit PARTITION BY and frame clauses.

When to use - and when NOT to

Use this skill when diagnosing or preventing Redshift performance bottlenecks - choosing distribution and sort keys, tuning joins and window functions, configuring COPY loads and VACUUM/ANALYZE maintenance, setting up Workload Management (WLM) query groups, or deciding when a materialized view or compression change is worth making. It explicitly cautions that every optimization should be validated with EXPLAIN plans and actual measurements rather than applied speculatively, and changes should be made incrementally. It is not a generic SQL-tuning skill for arbitrary databases - the guidance (DISTKEY/SORTKEY choices, columnar storage behavior, MPP data movement) is specific to Redshift's architecture and doesn't transfer to row-oriented databases.

Inputs and outputs

Input is table schemas, queries, or a Redshift cluster's current configuration and workload; output is DDL with explicit DISTKEY/SORTKEY/DISTSTYLE choices, optimized query rewrites, COPY commands (with COMPUPDATE, STATUPDATE, COMPRESSENCODING, and MANIFEST-based loading), a VACUUM/ANALYZE maintenance schedule, a WLM configuration defining named query groups with slot counts, timeouts, and memory allocation (an ETL queue, a reporting queue, and an ad hoc queue in the given example), and diagnostic queries against system tables like stl_query and svl_query_summary for identifying and analyzing slow queries.

Integrations

Built around Redshift's own system tables and views (pg_stats, stl_query, svl_query_summary, svv_alter_table_recommendations), S3 as the COPY source with IAM role-based credentials, materialized views for aggregation caching, and connection-pooling tools like PgBouncer for managing concurrent connections.

Who it's for

Data engineers and analysts operating an Amazon Redshift warehouse who need to design tables, tune queries, configure workload management, and diagnose performance issues using Redshift-specific mechanisms rather than generic relational-database tuning advice.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.