# Union without ALL

### Condition

Query in `RUNNING` status contains `UNION` instead of `UNION ALL`, and it aggregates a large number of rows.&#x20;

### How to fix

* Use `UNION ALL` instead of `UNION`. If you actually need de-duplication, consider using `GROUP BY` or `DISTINCT` on sub-query with multiple tables combined by `UNION ALL`.
* Process data in smaller chunks.

### Example

```
    UnionWithoutAllCondition(
        min_input_rows=10_000_000,  # at least 10M input rows for UNION without ALL
        notice_duration=60 * 10,  # 10 minutes for notice
    ),
```

### Specific arguments

* **min\_input\_rows** (int) - how many rows should go into `Aggregate` node caused by `UNION` (recommended min value is at least 1M to prevent false positives)


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.snowkill.net/condition/built-in-conditions/union-without-all.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
