Trino query execution
Trino runs a query by breaking it into stages, tasks, and splits that run in parallel across the worker nodes, and then combines the partial results into one final result.
When you run a query, Trino breaks it into smaller pieces of work that run at the same time
across the cluster. Trino uses the following units of work:
- Statement - The SQL text that you send to the coordinator.
- Query - The plan that the coordinator builds from the statement.
- Stage - A part of the query plan. Stages pass data to one another.
- Task - A part of a stage that runs on a worker. One stage runs as many tasks across the workers.
- Split - A piece of the source data that a task reads. Splits let many tasks work in parallel.
After the tasks finish, the coordinator collects the results from all the workers, joins them, and sends the final result to the client.
