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

> Reference and syntax for the CLEAR CACHE command.

# CLEAR CACHE

Clears the content of various caches on the engine the command is executed on.

This command is useful for performance testing. There is no need to call this during normal operation. Firebolt automatically evicts entries from caches that haven't been accessed for some time.
To view the current state of the cache, refer to the [`information_schema.engine_caches` view](/reference-sql/information-schema/engine-caches).

## Syntax

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
CLEAR [<cache_name>] CACHE
```

If a cache name is specified, clears this cache. Otherwise, clears all caches, including the caches for all tables and indexes.

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
CLEAR CACHE FOR [<table_or_index_name>]
```

Clears the cache for a specific table or index. With this, all data of the table or index needs to be fetched from object storage again. The performance will be similar to the performance on an engine that was just started.

## Parameters

| Parameter               | Description                                                 |
| :---------------------- | :---------------------------------------------------------- |
| `<cache_name>`          | The name of the cache to clear.                             |
| `<table_or_index_name>` | The name of a table or index to clear all cached data from. |

## Available Caches

| Cache Name                    | Description                                                                                                                          |
| :---------------------------- | :----------------------------------------------------------------------------------------------------------------------------------- |
| `EXTERNAL DATA`               | Cache for [external data](/performance-and-observability/iceberg-and-external-data) like metadata or data files of Iceberg tables.   |
| `QUERY`                       | [Subresult and result cache](/overview/queries/understand-query-performance-subresult).                                              |
| `PARQUET STATISTICS`          | Cache for parsed column statistics from [parquet](/guides/loading-data/working-with-semi-structured-data/load-parquet-data) footers. |
| `AUTOMATED COLUMN STATISTICS` | Cache for [automated column statistics](/performance-and-observability/query-planning/automated-column-statistics).                  |
| `HISTORY BASED STATISTICS`    | Cache for [history-based statistics](/performance-and-observability/query-planning/history-based-statistics).                        |
| `VECTOR INDEX`                | Clears the [vector search index](/overview/indexes/vector-search-index) cache.                                                       |

## Example 1

The following example clears all caches on the engine the command is executed on:

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
CLEAR CACHE
```

## Example 2

The following example clears the query cache on the engine the command is executed on:

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
CLEAR QUERY CACHE
```
