> ## Documentation Index
> Fetch the complete documentation index at: https://ngquct-worktree-statusbar-redesign.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Amazon Redshift

> Connect to Redshift clusters and Serverless via the PostgreSQL wire protocol, with DISTKEY/SORTKEY metadata display

# Amazon Redshift Connections

TablePro connects to Amazon Redshift, AWS's columnar data warehouse based on PostgreSQL 8.0.2. Connections use the same libpq driver as PostgreSQL, with Redshift-specific metadata queries for distribution style, sort keys, and table size.

## Quick Setup

<Steps>
  <Step title="Create Connection">
    Click **New Connection**, select **Amazon Redshift**, enter cluster endpoint/port/credentials/database, and click **Create**
  </Step>
</Steps>

## Connection Settings

| Field        | Default | Notes                                            |
| ------------ | ------- | ------------------------------------------------ |
| **Host**     | -       | Cluster endpoint (find in AWS Console)           |
| **Port**     | `5439`  | Redshift port                                    |
| **Database** | `dev`   | **Required** (default database in every cluster) |

Example: `my-cluster.abc123xyz.us-east-1.redshift.amazonaws.com:5439`

## Connection URL

```text theme={null}
redshift://user:password@cluster.region.redshift.amazonaws.com:5439/database
```

See [Connection URL Reference](/databases/connection-urls) for all parameters.

## Features

**Schemas**: Like PostgreSQL. Switch with **Cmd+K**. Default schema is `public`. Tables show metadata from `svv_table_info`: distribution style, sort keys, table size.

**Query Execution**: Full Redshift SQL support with COPY/UNLOAD for S3, window functions, ANALYZE COMPRESSION. Export to CSV/JSON/SQL/XLSX. Import from CSV/JSON/SQL/XLSX.

**DDL**: Shows DISTKEY, SORTKEY, DISTSTYLE, ENCODE directives. Foreign keys (informational only, not enforced).

**SSL/TLS**: Use **Required** or **Verify CA** for production.

**SSH Tunnels**: Supported for private VPC clusters.

## Limitations

Columnar warehouse (not general-purpose RDBMS): No traditional indexes (uses DISTKEY/SORTKEY), limited ALTER TABLE (no column rename), no enums/sequences/triggers, foreign keys informational only, restricted PL/pgSQL.

## Troubleshooting

**Connection refused**: Check security group allows port 5439, verify cluster is publicly accessible (or use SSH tunnel), ensure cluster isn't paused.

**Auth failed**: Verify master username/password in AWS Console, check IAM credentials, verify database access.

**Slow queries**: Check distribution style with `SELECT * FROM svv_table_info WHERE "table" = 'your_table'`, run `ANALYZE` to update stats, use `EXPLAIN`, match SORTKEY to WHERE/JOIN predicates.

**PostgreSQL differences**: Port 5439, use `IDENTITY(seed, step)` not `SERIAL`, no arrays/rich types, query activity via `stv_recents`/`svl_qlog` not `pg_stat_activity`.
