Skip to main content
emnode
Cost

Remove unused restored Log Analytics tables

A restored table puts long-term log data back into the hot cache so you can query it, and it keeps billing per gigabyte per day until you delete it. Find every restored table that is no longer being queried, confirm it is genuinely idle, and dismiss it to stop the meter.

12 min·10 sections·AZURE

Last reviewed

Restored Log Analytics tables: the basics

What is a restored table, and why does it keep charging?

When you need to query log data that has aged into long-term retention, Azure Monitor lets you restore a time range of it back into the hot cache. The restore operation creates a new table whose name ends in '_RST', allocates extra compute to query it at full KQL speed, and gives you a fast view over data that would otherwise be slow or unreachable. It is a genuinely useful feature for an incident investigation or an audit lookback. The catch is that the restored table has no retention setting and never expires on its own: it keeps billing until somebody deletes it.

Azure Advisor watches for exactly this. Its cost recommendation 'Consider removing unused restored tables' (recommendation ID eb22702a-5ace-416a-abee-c03c69cede34, resource type microsoft.operationalinsights/workspaces) flags any workspace that still has restored data active when nobody appears to be using it. Microsoft describes the potential benefit as 'significant savings on data retention', because a restore is billed by the volume of data restored and by how long it stays active, in units of price per gigabyte per day.

This is the classic shape of cloud waste: a temporary thing that was never made temporary in practice. An engineer restores a few weeks of a high-volume table to chase down an incident, gets the answer, and moves on. The '_RST' table sits there, querying nothing, billing every UTC-day. The work in this lesson is to find every restored table in the estate, confirm which ones are genuinely finished, and delete them so the meter stops.

In this lesson you will learn what a restored Log Analytics table is, why it keeps billing per gigabyte per day until it is deleted, how to find every restored table across your workspaces, and how to dismiss the idle ones safely without touching the source data. You will see the exact Azure Advisor recommendation that flags this, the az CLI to list and delete restored tables, and how its per-day pricing model means a forgotten restore quietly carries the 2 TB minimum charge every day it is left active.

Fun fact

The table with no expiry date

Almost every object in Azure Monitor has a retention setting that eventually ages data out for you. A restored table is the deliberate exception: Microsoft's own documentation states it 'has no retention setting, and you must explicitly dismiss the restored data when you no longer need it'. There is a second twist. Even when the source data ages out and the restored rows are dismissed, the empty '_RST' table itself stays behind until you delete it by hand. So a workspace can quietly accumulate a small museum of empty restored tables, each one a reminder of an investigation that nobody remembered to close out.

Finding restored tables across a workspace

Priya runs the platform team at a SaaS company. Azure Advisor has raised the 'Consider removing unused restored tables' cost recommendation against the central Log Analytics workspace, and she wants to see what is actually active before deleting anything.

Restored tables all share the '_RST' suffix, so she lists the workspace tables and filters to the restored ones, then checks how long each has been sitting there.

List the tables in the workspace and keep only the restored ones, which always end in '_RST'.

$ az monitor log-analytics workspace table list \ --resource-group rg-observability \ --workspace-name law-central \ --query "[?ends_with(name, '_RST')].{name:name, state:provisioningState}" -o table
Name State
------------------------- ---------
AppRequests_RST Succeeded
SecurityEvent_RST Succeeded
# Two restored tables still active. Confirm neither is being queried, then delete.

Every restored table ends in '_RST'. A state of 'Succeeded' means the restore completed and is live, so it is billing per gigabyte per day until it is deleted.

How a restore is billed and why deleting it is safedeep dive

A restore takes a time range from a source table in long-term retention and creates a destination table ending in '_RST' that provides a fast, full-KQL view over that data. The destination table does not copy or move the source data: Microsoft's documentation states the restored table 'provides a view of the underlying source data, but doesn't affect it in any way'. That is why deleting it is risk-free. Removing the '_RST' table dismisses the restore and stops the charge, while the source table and everything in its retention period stay exactly as they were.

The charge is the thing to understand. Restored logs are billed by the volume of data restored and by the duration the restore is active, in units of price per gigabyte per day, and the bill is applied on each UTC-day the restore stays live. Two minimums make a forgotten restore more expensive than people expect: charges are subject to a 2 TB minimum restored volume per restore, so restoring less still bills at the 2 TB floor each day, and the minimum charge is for a 12-hour restore duration. The practical upshot is that a restore is cheap to run for the hours of an investigation and quietly wasteful for the weeks it is left active afterwards.

Detection is already done for you. Azure Advisor evaluates workspaces and raises 'Consider removing unused restored tables' when restored data is active but appears unused, with a documented benefit of 'significant savings on data retention'. Because Advisor refreshes on a cycle rather than instantly, a restore you delete today clears the recommendation on the next evaluation, not the same second, which matters only if you are reconciling the saving against the dashboard.

What is the impact of leaving restored tables active?

The direct impact is recurring spend for nothing. A restored table that is no longer being queried delivers zero value and bills every UTC-day it stays active, charged on the volume restored at the per-gigabyte-per-day rate, never dropping below the 2 TB minimum. One forgotten restore of a busy table is a small charge; a habit of forgetting them across many investigations is a steady, invisible drain that shows up only when someone audits the bill.

The second-order impact is noise and drift. Empty and idle '_RST' tables clutter the workspace schema, make it harder to see which tables are real and in use, and erode trust in the cost numbers because part of the Log Analytics line is paying for data nobody is reading. Each straggler is also a small reminder that a temporary action was never closed out, which is exactly the kind of operational debt that compounds.

The reassuring side is how contained the downside of fixing it is. There is no framework requirement, no SLA and no reliability risk in play here, because a restore is purely a query convenience over data that already exists safely in retention. The only real cost of acting is a moment of confirmation that the table is genuinely idle, and the cost of not acting is paying indefinitely for compute that serves no query.

How do you clear restored tables safely?

Treat this as a short, repeatable loop rather than a one-off. The order matters: confirm a restore is genuinely idle before you delete it, so you never dismiss data an investigation is still using.

1. Inventory every restored table

List the tables in each workspace and filter to those ending in '_RST'. Treat this list, plus the Azure Advisor 'Consider removing unused restored tables' recommendation, as the source of truth. A state of 'Succeeded' means the restore is live and billing.

2. Confirm the restore is finished

For each restored table, check that no active investigation, query or workbook still depends on it. Restores are created for a specific, time-bounded purpose, so a restore older than that purpose, or one Advisor has flagged as unused, is almost always safe to remove. When in doubt, ask the owner before deleting.

3. Delete the idle ones to stop the charge

Delete each confirmed-idle '_RST' table. This dismisses the restore and stops the per-day charge immediately. It does not delete or alter the source table, so the original data stays in long-term retention exactly as it was. The charge ends on the UTC-day the restore is dismissed.

4. Make restores temporary by default

Stop the waste recurring. Adopt a convention that every restore is created for a stated, time-boxed purpose and deleted as soon as it is answered, run a scheduled sweep that lists '_RST' tables older than a threshold, and keep the Azure Advisor cost recommendation on your monthly review so any straggler is caught quickly.

# 1. Inventory: list every restored table in the workspace ('_RST' suffix).
RG=rg-observability
WS=law-central
az monitor log-analytics workspace table list \
  --resource-group "$RG" \
  --workspace-name "$WS" \
  --query "[?ends_with(name, '_RST')].name" -o tsv

# 2. Delete each confirmed-idle restored table. This dismisses the restore and
#    stops the per-GB-per-day charge. The source table is NOT affected.
for tbl in $(az monitor log-analytics workspace table list \
    --resource-group "$RG" --workspace-name "$WS" \
    --query "[?ends_with(name, '_RST')].name" -o tsv); do
  echo "Deleting idle restored table: $tbl"
  az monitor log-analytics workspace table delete \
    --resource-group "$RG" \
    --workspace-name "$WS" \
    --name "$tbl" \
    --yes
done

Quick quiz

Question 1 of 5

Azure Advisor raises 'Consider removing unused restored tables' against a workspace. What does a restored table actually cost you while it sits there?

You can now treat restored Log Analytics tables as spend that should end when its purpose does: find every '_RST' table, confirm which are genuinely idle against the Azure Advisor recommendation, delete them to stop the per-day charge, and make restores temporary by default with a scheduled sweep. Deleting a restored table never touches the source data, so this is the rare optimisation with no trade-off to weigh.

Back to the library