Edit

Configure table retention and cache policies by using the table retention policy wizard

A retention policy controls how long table data remains queryable.

A cache policy controls how much data stays in local SSD or RAM to improve query performance. Use these policies to balance data retention requirements, query speed, and storage cost.

In this article, you update retention and cache settings for a table in Azure Data Explorer by using the table retention policy wizard.

Prerequisites

Define and assign a table retention policy

  1. In the left menu of the Azure Data Explorer web UI, select the Data tab.

  2. Alternatively, open the page directly by using the one-click table policy entry point.

    Screenshot of Data management screen showing the table retention policy wizard in the Azure Data Explorer web UI.

  3. In the Table retention policy tile, select Update.

The Table retention policy window opens with the Policy update tab selected.

Policy update

You can either inherit values from the database or set new values.

Screenshot of Update table retention policy page. Cluster, Database, Table, and Policy fields must be filled out before proceeding to Update.

  1. The Cluster and Database fields automatically populate. Select a different cluster or database from the drop-down lists, or add a cluster connection.

  2. Under Table, select a table from the drop-down list.

  3. Under Retention policy, toggle On to apply the retention policy values from the database to the table. To create or update a separate policy for the table, toggle to Off.

  4. If you selected Off for a separate retention policy, enter values in the following fields:

    Setting Default value Field description
    Recoverability Yes Turn on or turn off data recoverability.
    Retention period 365 The number of days that data is stored in long-term storage before it's deleted. The period is measured from when the data is ingested.
  5. Under Caching policy, toggle On to apply the caching policy values from the database to the table. To create or update a separate policy for the table, toggle to Off.

  6. If you selected Off for a separate cache policy, enter values in the following fields:

    Setting Default value Field description
    Data (days) 31 The number of days that frequently queried data is available in RAM or SSD storage where it can be rapidly accessed to optimize query performance.
    Index (days) 31 The number of days for indexed access to data stored in external storage.
  7. Select Update.

Review the update summary

In the Summary tab, all steps show checkmark icons when the update finishes successfully. The tiles under these steps give you options to explore your data by using Quick queries or to undo changes by using Tools.

Screenshot of the final screen in the update table retention policy wizard for Azure Data Explorer.