> ## Documentation Index
> Fetch the complete documentation index at: https://docs.risingwave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CANCEL JOBS

> Use `CANCEL JOBS/JOB` to cancel specific streaming jobs that are in progress.

A streaming job is a job that creates an index, a materialized view, a table, a sink, or a source with connectors. You need to specify the IDs of the jobs that you want to cancel. You can use [SHOW JOBS](/sql/commands/sql-show-jobs) to get the IDs of the jobs that are in progress.

## Syntax

```sql theme={null}
CANCEL [ JOBS | JOB ] job_id [,...];
```

## Examples

```sqlShow all jobs theme={null}
SHOW JOBS;
------RESULT
  Id  |                     Statement                     | Progress
------+---------------------------------------------------+----------
 1010 | CREATE MATERIALIZED VIEW mv3 AS SELECT *FROM mv1  | 2.21%
 1012 | CREATE MATERIALIZED VIEW mv2 AS SELECT* FROM mv1  | 0.86%
```

```sql Cancel jobs theme={null}
CANCEL JOBS 1010, 1012;
------RESULT
Id
------
 1012
 1010

```

## Hanging or long running `CANCEL JOBS`

If your `CANCEL JOBS` command takes a long time to run, it could be due to high barrier latency. This command needs to be synchronized with barriers currently. To let the cancellation take effect immediately, you can use the `RECOVER` command in a separate session.

## Related topics

<CardGroup>
  <Card title="SHOW JOBS" icon="list" href="/sql/commands/sql-show-jobs" horizontal iconType="solid" />

  <Card title="Monitor statement progress" icon="chart-line" href="/operate/monitor-statement-progress" horizontal iconType="solid" />
</CardGroup>
