← Back to Glossary

Trino

Trino is an open-source distributed SQL query engine for federated analytics, querying data across many sources without moving it. It is the project formerly known as PrestoSQL.

Overview

Trino is an open-source, distributed SQL query engine designed for fast analytical queries across large and diverse datasets. It grew out of the Presto project created at Facebook: in 2019 several of Presto's original creators forked the project as PrestoSQL under the newly formed Presto Software Foundation, and in December 2020 it was renamed Trino following a trademark dispute over the "Presto" name. Trino is a query engine, not a storage system, and is often used as a federation layer over data lakes and databases.

Architecture and connectors

Trino runs as a cluster with a coordinator that parses and plans queries and workers that execute them in parallel, streaming data through memory. Its defining feature is a connector architecture: a single query can join data across many sources, including object storage (via table formats like Hive, Iceberg, and Delta Lake), relational databases, and other systems, without first copying it into a central warehouse.

Copy code

-- Trino: join data across two different catalogs/connectors SELECT u.region, SUM(o.amount) AS revenue FROM postgres.public.users u JOIN hive.sales.orders o ON o.user_id = u.id GROUP BY u.region ORDER BY revenue DESC;

Trino and DuckDB

Trino is built to scale out across a cluster and to federate queries over many remote sources, which suits large, multi-source, multi-user environments. DuckDB is a single-node, in-process OLAP engine, with MotherDuck as its serverless cloud version. For analytics that fit on one machine, or for reading data lake files directly, DuckDB avoids the cluster and coordinator overhead that Trino requires. DuckDB can also read open table formats and remote files directly:

Copy code

-- DuckDB: query lake files directly, single node SELECT region, SUM(amount) AS revenue FROM read_parquet('s3://sales/orders/*.parquet') GROUP BY ALL ORDER BY revenue DESC;

Related terms

FAQS

Trino is the project formerly called PrestoSQL. In 2019 some of Presto's original creators forked it from Facebook's project, and in December 2020 renamed it Trino after a trademark dispute over the Presto name. Facebook's original lineage continues as Presto (PrestoDB) under the Presto Foundation.

Trino is a distributed SQL query engine used for federated analytics: running fast SQL across many data sources, such as object storage, data lakes, and relational databases, without moving the data into a single warehouse first. Its connector architecture lets one query join across sources.