---
title: "What is a computed column?"
description: "A computed column is a value produced by an expression or a model when the row or its dependencies change, then cached."
url: "https://pixeltable.com/learn/what-is-a-computed-column"
updated: "2026-09-29"
vertical: "Orchestration"
doc: "https://docs.pixeltable.com/datastore/computed-columns"
---

# What is a computed column?

A computed column is a value produced by an expression or a model when the row or its dependencies change, then cached.

Updated: 2026-09-29
Part of [What is a declarative pipeline?](https://pixeltable.com/learn/what-is-a-declarative-pipeline).

## On this page

- [How it works](https://pixeltable.com/learn/what-is-a-computed-column#how-it-works)
- [What it is not](https://pixeltable.com/learn/what-is-a-computed-column#what-it-is-not)
- [Comparison](https://pixeltable.com/learn/what-is-a-computed-column#comparison)
- [Where Pixeltable fits](https://pixeltable.com/learn/what-is-a-computed-column#where-pixeltable-fits)
- [Questions](https://pixeltable.com/learn/what-is-a-computed-column#questions)

## How it works {#how-it-works}


- The expression reads other columns.
- Inserting or editing a dependency recomputes the dependents of that row.
- Unchanged rows keep their cached values.

## What it is not {#what-it-is-not}

It is not a trigger you maintain by hand, an edge function, or a batch job that rewrites the whole table.

## computed column: this, and the thing it is confused with {#comparison}

|  | This | Not this |
| --- | --- | --- |
| Written by | The engine, from an expression | Your application, every time |
| Cache | Per row | A full-table refresh |
| Failure | That row, visible | A job that retries the world |

## Where Pixeltable fits {#where-pixeltable-fits}

In Pixeltable a computed column is an assignment on the class. Insert a row and the expression runs.

```python
import pixeltable as pxt
from pixeltable.functions.openai import chat_completions

TableModel = pxt.model_base()

class Docs(TableModel, name='docs'):
    text: pxt.String

    summary = chat_completions(
        messages=[{'role': 'user', 'content': text}],
        model='gpt-4o-mini',
    ).choices[0].message.content
```

## Questions {#questions}

### How does computed column work? {#faq-1}

The expression reads other columns. Inserting or editing a dependency recomputes the dependents of that row. Unchanged rows keep their cached values.

### What is computed column often confused with? {#faq-2}

It is not a trigger you maintain by hand, an edge function, or a batch job that rewrites the whole table.

## In the blog

- [The Unified Multimodal Backend Agents Build With](https://pixeltable.com/blog/unified-multimodal-backend-agents-build-with)
- [Never Fuck With Your Backend Anymore](https://pixeltable.com/blog/never-fuck-with-your-backend-anymore)
- [The Post-AI Data Stack Needs a Multimodal Table](https://pixeltable.com/blog/post-ai-data-stack-needs-multimodal-table)
- [Neon Functions vs Pixeltable Computed Columns](https://pixeltable.com/blog/neon-functions-vs-pixeltable-computed-columns)
- [What Is a Multimodal Data Table?](https://pixeltable.com/blog/what-is-a-multimodal-data-table)
- [String or List of Strings in One Pixeltable Column?](https://pixeltable.com/blog/pixeltable-string-or-list-columns-json-array)

## Related

- [Documentation](https://docs.pixeltable.com/datastore/computed-columns)
- [Dependency Graph Magic: How Pixeltable Keeps Your AI Pipeline Data Consistent](https://pixeltable.com/blog/dependency-graph-magic-computed-columns)
- [Neon Functions vs Pixeltable Computed Columns](https://pixeltable.com/blog/neon-functions-vs-pixeltable-computed-columns)
- [AI Transformations Belong in the Schema, Not Bolted on Top](https://pixeltable.com/blog/ai-transformations-in-the-schema)
- [Declarative data infrastructure](https://pixeltable.com/use-cases/declarative-ai-data-infrastructure)
- [Pixeltable vs Supabase](https://pixeltable.com/compare/pixeltable-vs-supabase)
