Hybrid Tables are the centerpiece of Snowflake's Unistore architecture, a table type that delivers low-latency row-level operations (OLTP) and large-scale analytical queries (OLAP) on the same table. A PRIMARY KEY is mandatory, and the combination of row-oriented storage and indexes lets single-row lookups and point updates complete in milliseconds.
Standard Table
└─ columnar micro-partitions
└─ optimised for large scans and aggregation
└─ inefficient for single-row lookups
Hybrid Table
├─ row-oriented storage (with a primary key index)
│ └─ single-row SELECT / UPDATE / DELETE completes in milliseconds
│ └─ supports referential integrity (FOREIGN KEY)
│
└─ columnar storage (synced in the background)
└─ SELECT * and aggregate queries read from here
└─ Snowflake syncs row -> column automatically-- A basic Hybrid Table (a primary key is required)
CREATE OR REPLACE HYBRID TABLE app_db.public.users (
user_id INT PRIMARY KEY,
email VARCHAR(255) NOT NULL UNIQUE,
display_name VARCHAR(100),
status VARCHAR(20) DEFAULT 'active',
created_at TIMESTAMP_NTZ DEFAULT CURRENT_TIMESTAMP(),
last_login TIMESTAMP_NTZ,
metadata VARIANT
);
-- Hybrid Table with a composite primary key
CREATE OR REPLACE HYBRID TABLE app_db.public.user_sessions (
user_id INT,
session_id VARCHAR(64),
started_at TIMESTAMP_NTZ DEFAULT CURRENT_TIMESTAMP(),
expires_at TIMESTAMP_NTZ,
ip_address VARCHAR(45),
user_agent VARCHAR(500),
PRIMARY KEY (user_id, session_id),
FOREIGN KEY (user_id) REFERENCES app_db.public.users(user_id)
);
-- Add a secondary index
CREATE INDEX idx_users_email ON app_db.public.users (email);
CREATE INDEX idx_sessions_expires ON app_db.public.user_sessions (expires_at);| Aspect | Recommended | Avoid |
|---|---|---|
| Data type | INT, BIGINT, VARCHAR (short fixed length) | VARCHAR (long variable length), VARIANT |
| Cardinality | High-cardinality values (UUID, sequence) | Low-cardinality columns (status, region) |
| Number of columns | Composite keys of 1-3 columns | Composite keys of 4+ columns (index size grows) |
| Immutability | Columns whose values do not change | Frequently updated columns |
-- Insert a single row (low latency)
INSERT INTO app_db.public.users (user_id, email, display_name)
VALUES (1001, '[email protected]', 'Alice');
-- Point update by primary key (millisecond latency)
UPDATE app_db.public.users
SET last_login = CURRENT_TIMESTAMP(), status = 'active'
WHERE user_id = 1001;
-- Delete a single row by primary key
DELETE FROM app_db.public.users WHERE user_id = 1001;
-- MERGE (upsert): the application guarantees idempotency
MERGE INTO app_db.public.users t
USING (SELECT 1001 AS user_id, '[email protected]' AS email, 'Alice' AS name) s
ON t.user_id = s.user_id
WHEN MATCHED THEN UPDATE SET t.last_login = CURRENT_TIMESTAMP()
WHEN NOT MATCHED THEN INSERT (user_id, email, display_name) VALUES (s.user_id, s.email, s.name);
-- Analytical (OLAP) queries can run against the same table
SELECT
DATE_TRUNC('DAY', created_at) AS signup_date,
COUNT(*) AS new_users,
COUNT_IF(status = 'active') AS active_users
FROM app_db.public.users
GROUP BY signup_date
ORDER BY signup_date DESC;Hybrid Tables include a row-level locking mechanism. Standard Snowflake tables handle concurrency via snapshot isolation (MVCC) at the micro-partition level, but Hybrid Tables take pessimistic locks at the row level and serialize concurrent updates to the same row.
-- FOREIGN KEY constraints (enforced only between Hybrid Tables)
CREATE OR REPLACE HYBRID TABLE app_db.public.orders (
order_id INT PRIMARY KEY AUTOINCREMENT,
user_id INT NOT NULL,
total_amount NUMBER(12,2) NOT NULL,
order_status VARCHAR(20) DEFAULT 'pending',
created_at TIMESTAMP_NTZ DEFAULT CURRENT_TIMESTAMP(),
FOREIGN KEY (user_id) REFERENCES app_db.public.users(user_id)
);
-- NOT NULL, UNIQUE and DEFAULT constraints are supported too
-- CHECK constraints, however, are not supported| Characteristic | Standard Table | Hybrid Table |
|---|---|---|
| Storage format | Columnar (micro-partitions) | Row-oriented + columnar (background sync) |
| Primary key | Optional (constraint only, not enforced) | Mandatory (enforced as an index) |
| FOREIGN KEY | Syntactically supported but not enforced | Referential integrity is actually enforced |
| Indexes | None | Primary key index + secondary indexes |
| Single-row lookup | Full scan or pruning | Millisecond-level response via indexes |
| Concurrency control | MVCC (snapshot isolation) | Row-level locking |
| Clustering Keys | Supported | Not supported |
| Time Travel | Supported | Limited |
Data Architecture
Question 1
You want to build a web application's user session management table in Snowflake. You need low-latency single-row lookups by user_id, and you also run daily aggregate queries for session statistics. Which table design is most appropriate?
Correct answer: B
When you need both single-row lookup by user_id (OLTP) and aggregate queries (OLAP), Hybrid Tables are the best fit. The primary key index lets single-row access complete in milliseconds, and the columnar storage synced in the background handles aggregate queries efficiently. Clustering Keys on a standard table optimize range filters and are not sufficient to deliver low-latency point lookups.
What types of indexes can I use on Hybrid Tables?
Hybrid Tables automatically create an index on the PRIMARY KEY. You can also add secondary indexes with the CREATE INDEX statement, and UNIQUE INDEXes are supported as well. Standard Snowflake tables have no concept of indexes, so this is unique to Hybrid Tables. Keep in mind that adding indexes increases storage overhead and impacts DML performance, so keep them to the minimum required.
Can I set Clustering Keys on Hybrid Tables?
No, Clustering Keys cannot be set on Hybrid Tables. Hybrid Tables use a row-oriented storage structure and accelerate queries via primary key and secondary indexes. This is a different storage architecture from Clustering Keys, which assume the columnar micro-partition layout. The basic rule of thumb: use standard tables with Clustering Keys for OLAP workloads, and Hybrid Tables for mixed OLTP+OLAP workloads.
Can Hybrid Table data be replicated to other Snowflake regions?
Hybrid Tables can be replicated via database replication (failover groups), but with several constraints. At the replication target, Hybrid Tables are read-only and DML operations can only be executed in the primary region. Replication lag also means immediate visibility of the latest data is not guaranteed. If you need real-time consistency, design your application to keep its connection on the primary region.
Practice with certification-focused question sets
Try free questionsNicheeLab Editorial Team
NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.
Snowflake Certifications: All 11 Exams Explained (2026)
Every SnowPro certification — Associate, Core, Specialty, Ad...
Snowflake Exam Difficulty Ranking: All 11 Certs Compared (2026)
All 11 SnowPro exams ranked by difficulty with study-time es...
Snowflake Study Guide: Fastest Pass Route by Exam (2026)
How to pass SnowPro certifications efficiently — official ma...
SnowPro Core (COF-C03): Complete Exam Guide (2026)
Pass the SnowPro Core exam — six domains, scope, sample ques...
SnowPro Associate Platform (SOL-C01): Complete Guide (2026)
The entry-level SnowPro Associate exam — scope, weighting, s...