> For the complete documentation index, see [llms.txt](https://docs.datasentinel.io/manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datasentinel.io/manual/ai-connector/analyze-and-tune-workloads/track-drift-over-time.md).

# Track drift over time

Proactively spot slow drift before it becomes an incident: query times creeping up, bloat building, indexes going unused.

Not every problem arrives as a spike. Some build silently: query times creep up release after release, table and index bloat grows, WAL volume rises, an index quietly stops being used. Ask the assistant to compare periods regularly and flag these drifts while they are still cheap to fix, instead of waiting for them to surface as an incident.

Typical drifts worth watching:

* **Queries:** execution times or call counts trending up between two periods.
* **Bloat:** tables and indexes growing well beyond their live data.
* **Indexes:** unused indexes accumulating, adding write cost for no benefit.
* **Configuration:** parameters changed since the last review.
* **WAL and checkpoints:** write volume and checkpoint pressure rising over the weeks.

{% hint style="warning" %}
To avoid collecting a large volume of metrics in a single call, **each analysis is limited to a time window of 24 hours maximum**. Track drift by comparing short windows taken at different dates (yesterday against the same day four weeks ago, for example), not by running one continuous multi-week analysis.
{% endhint %}

**Example prompts:**

* "Compare today's workload on prod-eu-2 with the yesterday from 1 to 6am and flag every query whose average execution time drifted up by more than 20%."
* "Review table and index bloat on prod-eu-1 today, compare with one week ago, and tell me which objects grew the fastest."
* "Compare the configuration of my production instances today with the start of the month and list what changed."

{% hint style="success" %}
Drift checks are perfect candidates for automation: schedule them weekly and only the flagged drifts need your attention. See [Run recurring analyses](/manual/ai-connector/analyze-and-tune-workloads/recurring-analyses.md).
{% endhint %}

{% @arcade/embed url="<https://app.arcade.software/share/7hqwadPG5ImRsPC8Jw6y>" flowId="7hqwadPG5ImRsPC8Jw6y" %}

*This walkthrough was recorded with the Claude Desktop app.*

{% hint style="info" %}
**Continue from the menu.** Each drift check ends with a short menu of next steps: drill into the query whose time drifted the most, review the bloat of the tables that grew fastest, or look at what changed in the configuration. Pick an option to keep the investigation going without retyping the context.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.datasentinel.io/manual/ai-connector/analyze-and-tune-workloads/track-drift-over-time.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
