# Frequency Optimization

## Overview

Frequency Optimization surfaces tables whose **write frequency significantly exceeds their read frequency**.\
When a table is refreshed every hour but only queried once a day, the excess pipeline runs are wasted compute. Reducing the refresh cadence saves money without impacting consumers.

***

## How It Works

### Detection Logic

Seemore analyzes query history to build a read/write frequency profile for each table. A table is flagged when:

1. **High write frequency** — the table receives regular INSERT, MERGE, or COPY operations.
2. **Low read frequency** — SELECT activity is significantly less frequent than writes.
3. **Sustained gap** — there are sequences of **4 or more consecutive hours** with write activity but no reads, indicating a pattern rather than a one-time spike.

***

### Source and Destination Analysis

Seemore evaluates tables in two roles:

* **As a source (reads)** — how often the table is queried by downstream consumers.
* **As a destination (writes)** — how often the table is refreshed by upstream pipelines.

The ratio between these two frequencies determines the optimization opportunity.

***

### Savings Estimation

Each insight includes:

* **Current refresh frequency** and **recommended frequency** based on actual read patterns.
* **Estimated annual compute savings** from reducing pipeline cadence.
* **Storage savings** from fewer intermediate writes.

***

## Remediation

1. Review the suggested frequency reduction in the insight detail.
2. Adjust the pipeline schedule (dbt job, Airflow DAG, Fivetran sync frequency) to match the recommended cadence.
3. Monitor downstream consumers for any impact.
4. Mark the insight as **Done** once the schedule is updated.

***

## Configuration

| Parameter         | Default | Description                                                         |
| ----------------- | ------- | ------------------------------------------------------------------- |
| Analysis window   | 21 days | How far back Seemore analyzes read/write patterns.                  |
| Minimum write gap | 4 hours | Consecutive hours of writes without reads required to flag a table. |

{% hint style="info" %}
If you have configured **Exclude Users from Usage**, excluded users are filtered out of both the source (read) and destination (write) queries used for frequency analysis. This ensures that automated service account activity does not mask a table's true consumption pattern.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.seemoredata.io/external-docs/fundamentals/our-features/waste-reduction/frequency-optimization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
