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

# DROP MATERIALIZED VIEW (Continuous Aggregate)

> Drop a continuous aggregate view

export const HYPERTABLE = 'hypertable';

export const CAGG_CAP = 'Continuous aggregate';

export const CAGG = 'continuous aggregate';

<Icon icon="tag" iconType="duotone" /> Since [1.3.0][tsdb-1.3.0]

{CAGG_CAP} views can be dropped using the `DROP MATERIALIZED VIEW` statement.

This statement deletes the {CAGG} and all its internal
objects. It also removes refresh policies for that
aggregate. To delete other dependent objects, such as a view
defined on the {CAGG}, add the `CASCADE`
option. Dropping a {CAGG} does not affect the data in
the underlying {HYPERTABLE} from which the {CAGG} is
derived.

```sql theme={"dark"}
DROP MATERIALIZED VIEW <view_name>;
```

## Samples

Drop existing {CAGG}.

```sql theme={"dark"}
DROP MATERIALIZED VIEW contagg_view;
```

## Arguments

The syntax is:

```sql theme={"dark"}
DROP MATERIALIZED VIEW [IF EXISTS] <view_name>;
```

| Name          | Type | Default | Required | Description                                                      |
| ------------- | ---- | ------- | -------- | ---------------------------------------------------------------- |
| `<view_name>` | TEXT | -       | ✔        | Name (optionally schema-qualified) of {CAGG} view to be dropped. |

## Returns

For standard `DROP MATERIALIZED VIEW` return behavior, see the [PostgreSQL DROP MATERIALIZED VIEW documentation][postgres-drop-matview].

[postgres-drop-matview]: https://www.postgresql.org/docs/current/sql-dropmaterializedview.html

[tsdb-1.3.0]: https://github.com/timescale/timescaledb/releases/tag/1.3.0
