## Overview

<!-- markdownlint-disable MD032 -->
> [!NOTE]
> This lab only supports Chrome browser.

A runaway query is a query that consumes more time or resources than expected. A runaway query may become a "noisy neighbour", which impacts negatively on other queries' performance, by exhausting the resources.

TiDB provides the capability to manage the runaway queries in the resource control feature. You can set criteria for a resource group to identify runaway queries and automatically take actions to prevent them from exhausting resources and affecting other queries. Furthermore, you can also use runaway watches to quickly identify runaway queries for a given SQL statement or digest.

In this lab, we show you how to identify and manage runaway queries, as well as monitor potential runaway queries.

> [!TIP]
> This feature may not be available on all TiDB versions/tiers. Please check the [documentation](https://docs.pingcap.com/tidb/stable/tidb-resource-control-runaway-queries/) for more details.

### Tasks

+ Build a TiDB cluster and setup testing schema
+ Identify and kill runaway queries
+ Monitor potential runaway queries

> [!TIP]
> Click **Start** to launch the lab environment.
> Once the environment is ready, the resources assigned to your hands-on session will be populated with the actual values, so you can follow the lab guide step-by-step to complete the practice.
