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

# Materialized views

> CREATE, REFRESH, SHOW, DROP

Materialized views cache the results of a `SELECT` (search or analytics) on disk. They require a local on-disk database path.

## CREATE

```sql theme={null}
CREATE MATERIALIZED VIEW top_tags AS
SELECT tag, COUNT(*) FROM articles GROUP BY tag
```

## REFRESH

```sql theme={null}
REFRESH MATERIALIZED VIEW top_tags
```

Recomputes cached rows from the current table data.

## SHOW

```sql theme={null}
SHOW MATERIALIZED VIEWS
```

## DROP

```sql theme={null}
DROP MATERIALIZED VIEW top_tags
```

## DESCRIBE

`DESCRIBE view_name` reports row count and notes that the object is a materialized view.


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