[Yandex Cloud documentation](../../index.md) > [Yandex Managed Service for Trino](../index.md) > [Concepts](index.md) > Fault-tolerant query execution

# Fault-tolerant query execution in a Managed Service for Trino cluster

Managed Service for Trino clusters support the [fault-tolerant execution](https://trino.io/docs/current/admin/fault-tolerant-execution.html) mechanism. By default, when resources are insufficient or a query fails with an error, the [worker](index.md#workers) will stop processing the query and you will need to run it again manually. With fault-tolerant execution enabled, the query or its component task will be retried in the event of failure.

To ensure fault-tolerant execution of queries, Exchange Manager regularly exports intermediate results to an Object Storage service bucket. If a query fails, the [coordinator](index.md#coordinator) will assign the retry to another worker, which can use the previously processed data.

{% note info %}

Fault-tolerant execution does not apply to incorrect or misspelled queries.

{% endnote %}

Fault-tolerant execution is only supported for the following [connectors](index.md#connector):

* Delta Lake
* Hive
* Iceberg
* Oracle <code><b><small>Preview</small></b></code>
* PostgreSQL
* MS SQL Server <code><b><small>Preview</small></b></code>

To enable fault-tolerant execution, select the **Retry object type** parameter under **Retry policy** when [creating](../operations/cluster-create.md) or [updating](../operations/cluster-update.md#change-retry-policy) a cluster:

* **Task**: Retries the intermediate task within the query that caused worker failure.

   {% note warning %}

   For high volumes of simple queries, retrying tasks may lead to longer delay in complex batch queries. We recommend creating a dedicated Managed Service for Trino cluster with task retry settings for complex batch queries.

   {% endnote %}

* **Query**: Retries all [stages of the query](index.md#query-execution) where worker failure occurred.

For more information about fault-tolerant query execution, see the [official guides](https://trino.io/docs/current/admin/fault-tolerant-execution.html).