---
title: "How we built an AI agent you can trust with your production tables"
description: "ClickHouse Cloud announces Schema Advisor, an end-to-end AI-assisted experience for schema changes now in Private Preview. Schema changes in ClickHouse heavily influence performance, but figuring out what to change, testing, and deploying with zero downtime is often deprioritized. Schema Advisor uses deterministic tests on query logs to generate recommendations, then LLMs to build a deployment plan, and Temporal workflows to execute the plan safely. Impact analysis runs against a sample table in the same service or an isolated sandbox, comparing query time, rows scanned, and data read. Deployment uses either a full table rebuild with EXCHANGE TABLES for zero downtime or a direct ALTER TABLE for changes like indexes and projections."
---

# How we built an AI agent you can trust with your production tables

[Clickhouse](https://yomu.fyi/company/clickhouse) · Amy Chen · Nov 30, 2026

**Type:** Announcement

## Summary

ClickHouse Cloud announces Schema Advisor, an end-to-end AI-assisted experience for schema changes now in Private Preview. Schema changes in ClickHouse heavily influence performance, but figuring out what to change, testing, and deploying with zero downtime is often deprioritized. Schema Advisor uses deterministic tests on query logs to generate recommendations, then LLMs to build a deployment plan, and Temporal workflows to execute the plan safely. Impact analysis runs against a sample table in the same service or an isolated sandbox, comparing query time, rows scanned, and data read. Deployment uses either a full table rebuild with EXCHANGE TABLES for zero downtime or a direct ALTER TABLE for changes like indexes and projections.

## Context

Schema changes in ClickHouse heavily influence performance because the schema dictates data storage, primary key, and compression. Getting the schema right can turn full table scans into reading a few granules and cut storage costs, but the process of figuring out what to change, testing, and deploying with zero downtime is often deprioritized.

## Approach / What changed

Schema Advisor uses deterministic tests on query logs to generate recommendations, then LLMs to build a deployment plan, and Temporal workflows to execute the plan safely. Impact analysis runs against a sample table in the same service or an isolated sandbox. Deployment uses either a full table rebuild with EXCHANGE TABLES for zero downtime or a direct ALTER TABLE for changes like indexes and projections.

## Takeaways

- Schema Advisor uses deterministic tests on query logs to generate recommendations, not AI, to avoid hallucinations and ensure consistency.
- AI builds the deployment plan, but Temporal workflows execute the SQL, and the LLM never runs SQL directly; only templated SQL approved by the user is executed.
- Impact analysis can run in an isolated, ephemeral service created from your last backup, avoiding any impact on the live production table.

## FAQ

### How are schema recommendations generated without AI?

Recommendations are generated by deterministic tests that run in the background on your query logs, not by AI. This ensures consistency and avoids hallucinations.

### How does Schema Advisor prevent AI from executing SQL?

AI builds the deployment plan, but the plan is handed to a Temporal workflow that executes the SQL. The LLM never runs SQL directly; only templated SQL approved by the user is executed by the workflow.

### How is impact analysis isolated from production?

Impact analysis can run in the same service or in a completely isolated, ephemeral service created from your last backup. This avoids touching the live table and minimizes required permissions.

**Tags:** [AI](https://yomu.fyi/topic/ai), [ClickHouse](https://yomu.fyi/topic/clickhouse), [Schema Design](https://yomu.fyi/topic/schema-design), [Temporal](https://yomu.fyi/topic/temporal)

- Source: [Clickhouse](https://clickhouse.com/blog/how-we-built-an-ai-agent-you-can-trust-with-your-production-tables)
- Source URL: https://clickhouse.com/blog/how-we-built-an-ai-agent-you-can-trust-with-your-production-tables
- Ingested by Yomu: 2026-12-01T03:00:13.320Z

[Read original post](https://clickhouse.com/blog/how-we-built-an-ai-agent-you-can-trust-with-your-production-tables)
