---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://ydb.tech/docs/en/yql/reference/syntax/batch-delete.md?version=v26.1
  - https://ydb.tech/docs/ru/yql/reference/syntax/batch-delete.md?version=v26.1
  - href: en/yql/reference/syntax/batch-delete.md
    type: text/markdown
    title: Markdown version
  - href: ../../../llms.txt
    type: text/markdown
    title: llms.txt
sourcePath: en/core/yql/reference/syntax/batch-delete.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ydb.tech/docs/en/llms.txt

# BATCH DELETE FROM

{% note tip %}

Before diving into `BATCH DELETE FROM`, it is recommended to familiarize yourself with the standard [DELETE FROM](https://ydb.tech/docs/en/yql/reference/syntax/delete.md?version=v26.1).

{% endnote %}

`BATCH DELETE FROM` allows to delete records in large tables while minimizing the risk of lock invalidation and transaction rollback by weakening guarantees. Specifically, data deletion is performed as a series of transactions for each [partition](https://ydb.tech/docs/en/concepts/datamodel/table.md?version=v26.1#partitioning) of the specified table separately, processing 10 000 rows per iteration. Each query processes up to 10 partitions concurrently.

This query, like the standard `DELETE FROM`, executes synchronously and returns a status. If an error occurs or the client disconnects, data deletion stops, and applied changes are not rolled back.

The semantics are inherited from the standard `DELETE FROM` with the following restrictions:

* Supported only for [row-oriented tables](https://ydb.tech/docs/en/concepts/glossary.md?version=v26.1#row-oriented-table).
* Supported only for queries with [implicit transaction control](https://ydb.tech/docs/en/concepts/transactions.md?version=v26.1#implicit).
* The use of subqueries and multiple statements in a single query is prohibited.
* The `RETURNING` clause is unavailable.

## Example

```yql
BATCH DELETE FROM my_table
WHERE Key1 > 1 AND Key2 >= "One";
```
