ARCHITECTURAL WHITE PAPER

Data Modeling for the LLM Era

150–200 Column Denormalized Tables vs. Dimensional Star Schema in Amazon Redshift

Author: Vizz Analytics Data Architecture Group Published: November 2026 Audience: Data Architects, Analytics Engineers, AI Platform Teams

Executive Summary

As enterprises integrate Large Language Models (LLMs) and agentic workflows (such as Claude Code, Text-to-SQL copilots, and autonomous BI analysts) into self-service analytics, database schema design has shifted from a backend storage concern into a primary AI interface constraint.

A prevalent pattern in enterprise Amazon Redshift clusters is the deployment of One Big Table (OBT) or ultra-wide denormalized tables spanning 150–200+ columns. While originally adopted to eliminate joins for legacy BI dashboards, this architecture introduces severe friction when exposed to LLM agents:

  1. Token & Agentic Loop Multipliers: Wide schemas consume 6,000–8,000 input tokens per turn just to transmit DDL, types, and column descriptions. Even with prompt caching, ambiguity triggers multi-turn agent retries that multiply uncached output tokens and latency.
  2. Column Selection Fatigue: LLMs experience attention dilution (“lost in the middle”) and semantic collisions across competing date, geography, and revenue fields—leading to silent analytical errors rather than obvious syntax failures.
  3. Redshift Write Amplification & Concurrency Penalties: In Redshift’s columnar architecture, updating a single attribute on a 200-column table triggers a delete-and-insert across all 200 column segments, driving heavy VACUUM overhead and storage bloat.

This paper contrasts 150–200 column Redshift tables against a Dimensional Star Schema, evaluates LLM economics using Claude Code Sonnet 5.5 (including prompt caching and hybrid routing), and provides a zero-downtime migration roadmap that avoids common Redshift view anti-patterns.

1. The Reality of 150–200 Column Tables in Amazon Redshift

Wide tables became popular in Redshift because columnar storage (1 MB immutable blocks with ZSTD/AZ64 compression) allows analytical queries to read only the columns listed in the SELECT and WHERE clauses. At 150–200 columns, however, both the LLM layer and the Redshift engine hit structural limits.

┌────────────────────────────────────────────────────────────────────────┐
│                   MONOLITHIC OBT TABLE (150–200 COLUMNS)               │
├───────────────┬─────────────────┬───────────────────┬──────────────────┤
│ Keys & Events │ Customer Detail │ Order & Logistics │ Financial Items  │
│ (Cols 1-20)   │ (Cols 21-70)    │ (Cols 71-130)     │ (Cols 131-200)   │
└───────────────┴─────────────────┴───────────────────┴──────────────────┘
                                    │
        ▼ (Every query requires full 200-col metadata or brittle col-RAG)
┌────────────────────────────────────────────────────────────────────────┐
│                    LLM PROMPT CONTEXT (6,000–8,000 TOKENS)             │
└────────────────────────────────────────────────────────────────────────┘

1.1 The LLM Bottleneck

  • Context Dilution & “Lost in the Middle”: Even with long-context models, transformer attention is non-uniform across dense schema listings. A critical metric (e.g., recognized_net_revenue_usd) buried at column 124 receives weaker attention than fields near the start or end of the prompt.
  • Semantic Collisions (Silent Wrong Answers): Wide enterprise tables accumulate near-duplicate columns over years of ad-hoc additions—such as five competing dates (order_date, ship_date, gl_posting_date, dw_inserted_at, status_updated_at) or four competing states (bill_to_state, ship_to_state, customer_residence_state, tax_jurisdiction_state). The generated SQL executes cleanly but returns financially incorrect results.
  • Grain Inflation & Fan-Out Duplication: Wide tables frequently flatten mixed grains (e.g., order headers repeated across order line items). An LLM answering “What was total revenue by customer segment?” will often compute SUM(order_total_usd) instead of SUM(line_item_net_usd), silently multiplying revenue by line count.

1.2 The Redshift Engine Bottleneck

  • Severe UPDATE Write Amplification: Redshift executes every UPDATE as a DELETE (marking the old row ghosted) followed by an INSERT of a full new row across all 200 columns. Changing a single customer tier or shipping status rewrites 200 column segments and accelerates VACUUM and ANALYZE pressure.
  • Minimum Block Allocation Overhead: Redshift allocates a minimum of 1 MB per column per slice. On a 16-slice cluster, a single 200-column table consumes at least 3.2 GB even with only a handful of rows.
  • Distribution & Sort Key Compromises: A monolithic table can only optimize for a single DISTKEY and SORTKEY. Queries filtering on secondary domains cannot leverage zone maps and fall back to full column scans.

2. The Target State: Dimensional Star Schema

A Star Schema decomposes a 200-column monolith into a narrow central Fact Table (explicit grain, numeric measures, foreign keys) surrounded by 4–6 denormalized Dimension Tables (descriptive attributes).

Note — Why Star Schema over Snowflake Schema or 3NF?

While 3NF and Snowflake schemas further eliminate dimension redundancy, they force LLMs to traverse multi-hop join graphs (e.g., fact_sales → dim_product → dim_subcategory → dim_category). Multi-hop pathfinding is a primary driver of join hallucinations in Text-to-SQL. Star Schema sits at the Pareto frontier: 1-hop deterministic joins with clean domain separation.

                    ┌─────────────────────────┐
                    │      DIM_CUSTOMER       │
                    │ customer_id (PK)        │
                    │ customer_name, segment  │
                    │ billing_country         │
                    └────────────┬────────────┘
                                 │ (1-hop join)
┌─────────────────────────┐      ▼       ┌─────────────────────────┐
│      DIM_PRODUCT        │  ┌────────┐  │        DIM_DATE         │
│ product_id (PK)         ├─►│  FACT  │◄─┤ date_id (PK)            │
│ sku, category, brand    │  │  SALES │  │ calendar_date, quarter  │
└─────────────────────────┘  │        │  └─────────────────────────┘
                             │sales_id│
                             │net_amt │
                             │qty     │
                             └───▲────┘
                                 │ (1-hop join)
                    ┌────────────┴────────────┐
                    │        DIM_STORE        │
                    │ store_id (PK)           │
                    │ store_name, region      │
                    └─────────────────────────┘

Why Star Schema Excels with LLMs

  1. Clean Table-Level Pruning: For a question like “What was product category revenue in Q3?”, an orchestrator or lightweight router prunes out DIM_CUSTOMER, DIM_STORE, and DIM_PROMOTION, passing only FACT_SALES, DIM_PRODUCT, and DIM_DATE (~30–40 columns instead of 200).
  2. Single-Hop, Unambiguous Joins: Every dimension attaches directly to the fact table (Fact ↔ Dim), eliminating bridge-table confusion.
  3. Explicit Attribute Scoping: DIM_CUSTOMER.country and DIM_STORE.country live in distinct namespaces, dramatically reducing semantic collisions.
  4. Enforced Analytical Grain: Every row in FACT_SALES represents one atomic business event (e.g., one order line), preventing accidental fan-out aggregations.

3. Comprehensive Head-to-Head Comparison

Dimension 150–200 Column OBT (Redshift) Dimensional Star Schema (Redshift) Advantage
LLM Prompt Size 6,000–8,000 tokens (entire table) 800–1,500 tokens (Fact + pruned Dims) Star Schema (75–85% smaller)
LLM Analytical Accuracy 65%–78% (column & grain errors) 88%–96% (scoped domains, clear grain) Star Schema (+15–20% gain)
Model Tier Flexibility Requires frontier models for ambiguity Supports hybrid routing to fast/low-cost tiers Star Schema
SQL Join Complexity Zero joins (SELECT ... FROM obt) 1–3 single-hop joins (JOIN dim ON ...) OBT (trivial queries)
Fan-Out / Grain Safety High risk of silent double-counting Strict single-grain fact table Star Schema
Redshift Update Cost High (DELETE+INSERT across 200 cols) Isolated to small dimension tables Star Schema
Redshift Distribution Single DISTKEY compromise DISTSTYLE ALL (small dims) / co-located DISTKEY Star Schema
Governance & Semantic Layer Hard to maintain metric definitions Maps 1:1 to semantic models & MCP Star Schema

4. Economic Analysis: LLM Query Cost (Claude Code Sonnet 5.5)

To model realistic production economics, consider an analytics platform processing 50,000 analytical queries per month using Claude Code Sonnet 5.5 in an agentic Text-to-SQL workflow (schema inspection, SQL generation, execution validation, and error self-correction).

Modeling Assumptions

  • Illustrative Claude Code Sonnet 5.5 API Pricing (Sonnet-tier benchmark): Standard Input = $3.00 / 1M tokens; Prompt Cache Read (90% discount on static schema prefix) = $0.30 / 1M tokens; Output (SQL + reasoning + tool calls; never cached) = $15.00 / 1M tokens.
  • 200-Column OBT Profile: 7,000 input tokens/turn, 300 output tokens/turn, 1.35 average turns/query (35% overhead from column disambiguation, sample-value probes, and retries).
  • Star Schema (Pruned) Profile: 1,200 input tokens/turn, 350 output tokens/turn (slightly longer SQL with 1–2 joins, less disambiguation chatter), 1.05 average turns/query (5% retry rate).

Scenario A: Uncached / Dynamic Agentic Context

  • 200-Column OBT: Input (472.5M tokens × $3.00 = $1,417.50) + Output (20.25M tokens × $15.00 = $303.75) = $1,721.25 / month
  • Star Schema (Pruned): Input (63.0M tokens × $3.00 = $189.00) + Output (18.375M tokens × $15.00 = $275.63) = $464.63 / month (-73.0% on the exact same model)

Scenario B: With 90% Prompt Caching Enabled

  • 200-Column OBT (Cached): Cached Input ($127.58) + Uncached Input ($141.75) + Output ($303.75) = $573.08 / month
  • Star Schema (Cached): Cached Input ($17.01) + Uncached Input ($18.90) + Output ($275.63) = $311.54 / month (-45.6% even with aggressive caching)
Important — Why Prompt Caching Does Not Save OBT

Caching reduces static input costs, but it cannot fix column selection hallucinations, cannot cache output tokens from extra agentic retry turns, and does not prevent silent grain-inflation bugs.

Scenario C: Hybrid Routing (Fast Tier + Claude Code Sonnet 5.5)

Because Star Schema makes 80% of business queries straightforward 1-hop aggregations, a router can dispatch simple queries to a lightweight model (illustrative $0.25/M input, $1.25/M output) while reserving Claude Code Sonnet 5.5 for the 20% complex multi-CTE or window-function queries: $30.98 (fast tier) + $62.31 (Sonnet 5.5 cached) = $93.29 / month (-83.7% to -94.6% savings).

Cost Scenario (50k Queries/Month) 200-Col OBT Star Schema Savings
Claude Code Sonnet 5.5 (Uncached) $1,721.25 $464.63 -73.0%
Claude Code Sonnet 5.5 (90% Cached) $573.08 $311.54 -45.6%
Hybrid (80% Fast + 20% Sonnet 5.5 Cached) N/A (accuracy drops) $93.29 -83.7% to -94.6%

5. Zero-Downtime Transition Roadmap for Redshift

Re-architecting production Redshift pipelines takes time. The following three-phase roadmap delivers immediate LLM accuracy and cost gains without breaking downstream BI reports.

Phase 1 · Week 1 (Zero ETL) Prompt Grouping & Column Pruning

Group columns by logical domain in prompts and shortlist 10–20 candidate columns before SQL generation.

Phase 2 · Weeks 2–4 Domain Views & Semantic Layer

Expose 30–45 column join-free domain projection views backed by governed metric definitions.

Phase 3 · Quarter 1–2 Physical Star Schema in Redshift

Rebuild core marts as physical Fact and Dimension tables tuned with Redshift DISTKEY / DISTSTYLE.

Caution — Avoid the “Logical Star View” Self-Join Trap in Redshift

Do not create standard logical views that split a single OBT into v_fact_sales and v_dim_customer using SELECT DISTINCT ... FROM obt_sales. When an LLM joins those views, Redshift executes an expensive self-join and full-table hash aggregate against the massive OBT. Use standard views only for narrow, join-free domain projections; materialize dimensions via scheduled CTAS / incremental tables or Redshift MATERIALIZED VIEWs when a Star Schema interface is needed before full dbt refactoring.

Phase 3 Redshift Physical DDL Reference

-- Fact Table (Narrow, Single-Grain, Co-Located on High-Cardinality Join Key)
CREATE TABLE fact_sales (
    sales_line_id   BIGINT,
    customer_id     BIGINT,
    product_id      BIGINT,
    date_id         INT,
    line_net_amount NUMERIC(12,2),
    quantity        INT
)
DISTKEY(customer_id)
SORTKEY(date_id);

-- Small-to-Medium Dimension (< 2-5M rows: Replicate to All Nodes)
CREATE TABLE dim_product (
    product_id BIGINT,
    sku        VARCHAR(64),
    category   VARCHAR(100),
    brand      VARCHAR(100)
)
DISTSTYLE ALL
SORTKEY(product_id);
Tip — Large Dimension Distribution (> 5M Rows)

Avoid DISTSTYLE ALL on very large dimension tables (such as a 50M-row dim_customer), as replicating tens of millions of rows to every compute node wastes storage and slows loads. Instead, assign the same DISTKEY(customer_id) to both fact_sales and dim_customer so Redshift performs a fast, co-located join with zero network redistribution (DS_DIST_NONE). For rapidly evolving workloads, Redshift’s DISTSTYLE AUTO and SORTKEY AUTO also serve as a safe baseline.

6. Conclusion & Recommendations

  1. Ultra-wide OBT is an LLM anti-pattern. Even with prompt caching on Claude Code Sonnet 5.5, wide tables inflate output token spend through multi-turn retries, suffer from column selection fatigue, and carry high risk of silent grain-inflation errors.
  2. Star Schema is the optimal AI-ready warehouse model. It cuts prompt size by 75–85%, reduces Claude Code Sonnet 5.5 costs by 46–73% directly (and up to 94% with hybrid model routing), eliminates join-path hallucinations, and aligns cleanly with Redshift’s MPP storage and distribution mechanics.
  3. Execute Incrementally. Start immediately with Phase 1 (Column Pruning) and Phase 2 (Domain Projection Views + Governed Semantic Definitions) while avoiding logical self-join views, then systematically transition core subject areas to Phase 3 (Physical Star Schema) in Redshift.

Request an early pilot