title | description | ms.reviewer | ms.topic | ms.date |
---|---|---|---|---|
.alter cluster caching policy command |
Learn how to use the `.alter cluster caching policy` command to change the cluster's caching policy. |
yonil |
reference |
05/25/2023 |
Changes the cluster's caching policy. To speed up queries, data is cached on processing nodes, SSD, or even in RAM. The caching policy allows your cluster to describe the data artifacts that it uses, so that more important data can take priority.
You must have AllDatabasesAdmin permissions to run this command.
.alter
cluster
policy
caching
PolicyParameter
[!INCLUDE syntax-conventions-note]
Name | Type | Required | Description |
---|---|---|---|
PolicyParameter | string |
✔️ | One or more policy parameters. For parameters, see caching policy. |
Returns a JSON representation of the policy.
The following example sets the caching policy to include the last 30 days.
.alter cluster policy caching hot = 30d
Output
PolicyName | EntityName | Policy | ChildEntities | EntityType |
---|---|---|---|---|
CachingPolicy | {"DataHotSpan": { "Value": "30.00:00:00" }, "IndexHotSpan": { "Value": "30.00:00:00"}} |
This command sets the caching policy to include the last 30 days and additional data from January and April 2021.
.alter cluster policy caching
hot = 30d,
hot_window = datetime(2021-01-01) .. datetime(2021-02-01),
hot_window = datetime(2021-04-01) .. datetime(2021-05-01)
Output
PolicyName | EntityName | Policy | ChildEntities | EntityType |
---|---|---|---|---|
CachingPolicy | {"DataHotSpan": { "Value": "30.00:00:00" }, "IndexHotSpan": { "Value": "30.00:00:00" },"HotWindows": [{ "MinValue": "2021-01-01T00:00:00Z", "MaxValue": "2021-02-01T00:00:00Z" }, { "MinValue": "2021-04-01T00:00:00Z", "MaxValue": "2021-05-01T00:00:00Z" }]} |