> 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/investigate-blocking-scenarios.md).

# Investigate a blocking scenario

Untangle blocking chains, live or in the past: root blockers, locked objects, and the queries involved.

When sessions pile up waiting on locks, ask the assistant to untangle the blocking chain: who blocks whom, which session sits at the root, which objects are contended, and which queries are involved.

It works in two modes:

* **Right now:** a live snapshot of the current blocking sessions, to break an incident in progress.
* **In the past:** a lock-contention analysis over any time window, collapsing the blocking chains to their root blockers and surfacing the hot objects, the offending queries, and any deadlocks.

**Example prompts:**

* **Historical:**
  * "What was blocking on prod-eu-2 this afternoon at around 3pm?"
* **Live:**
  * "Is anything blocking on prod-eu-2 at the moment?"

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

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

{% hint style="info" %}
**Continue from the menu.** Once the chain is untangled, the next-step menu lets you drill into the root blocker's query, look at the detailed stats of the contended table, widen the window to see whether the pattern recurs, or ask the assistant to prove a finding. 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/investigate-blocking-scenarios.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.
