> ## Documentation Index
> Fetch the complete documentation index at: https://basedash.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Materialized models

> Store a model's results as a table so charts load without re-running the query

A materialized model stores a [model](/docs/features/models)'s results as a table in your Basedash-managed warehouse. Charts and the AI read the table instead of re-running the model's SQL, and Basedash rebuilds it when new data syncs.

> [!NOTE]
>
> Materialized models are in beta and may not be enabled for your organization
> yet. Contact [support@basedash.com](mailto:support@basedash.com) to request
> access.

## Overview

Materialize a model when its SQL is expensive, for example a model that joins several large synced tables or computes daily rollups. Queries that use the model then read a ready-made table, so charts load faster.

Materialization requires the model to be on a Basedash-managed warehouse: [Basedash Warehouse](/docs/data-sources/warehouses/basedash-warehouse) on Postgres or MotherDuck. The table is stored in the `basedash_materialized` schema of that warehouse.

You keep querying the model the same way, as `models.<reference_name>`. Basedash points those queries at the materialized table.

## Materialize a model

1. Open the model from **Models** in the sidebar.
2. Turn on **Enable materialized table**.
3. Basedash builds the table. While it builds, the model shows **Building table…**. When it's done, it shows the row count and when it was built.

You need edit access to the model's data source.

## When the table rebuilds

Basedash rebuilds a materialized table:

* When a connector sync finishes for any schema the model reads from.
* When you click **Rebuild**.

There's no separate schedule; the table stays as fresh as the data it's built from. Each rebuild writes to a new table and swaps it in when it's done, so charts keep reading the previous table while a rebuild runs. If a build fails, the model shows **Last build failed. Charts use the previous table.**

## Requirements and limits

> [!NOTE]
>
> * The model must be on a Basedash-managed Postgres or MotherDuck warehouse. -
>   The model's SQL must be read-only. - The model's reference name can contain
>   only lowercase letters, numbers, and underscores, up to 52 characters. -
>   Models on data sources with [row-level
>   security](/docs/administration/row-level-security) can't be materialized.

To stop using the table, turn off **Enable materialized table**. Queries go back to running the model's SQL.

## FAQ

> **Can I materialize a model on my own Snowflake or BigQuery warehouse?**
>
> Not yet. Materialization only works on Basedash-managed warehouses.

> **Do I need to change my charts?**
>
> No. Charts that query `models.<reference_name>` use the materialized table
> automatically.

> **Why is my materialized table out of date?**
>
> It rebuilds when a connector sync finishes for the schemas the model reads.
> If the connector is paused or syncs infrequently, click **Rebuild**, or
> change the connector's sync frequency.

## Related

* [Models](/docs/features/models)
* [Basedash Warehouse](/docs/data-sources/warehouses/basedash-warehouse)
* [Multi-source charts](/docs/features/multi-source-charts)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.