目录
1. 概述
参考:
1.1. Trino
1.1.1. 概述
-
名字由来
It was inspired from neutrinos (subatomic particles), which are light and travel very fast. And then we made the name smaller by shortening it to trino. --中微子 --<PrestoSQL 项目更名为 Trino,彻底和 PrestoDB 分家 >
-
Trino是什么?
- Trino 是一个 MPP(大规模并行处理) 架构的内存型 OLAP 引擎,注意它只是一个查询引擎,
- 并不是一个数据库,因为 Trino 不存储数据。通过 connector 机制可以获取多种数据源的数据,
- 比如 Trino-hive 这个 connector 就可以获取到 Hive 表的数据。
- Trino 主要适用于 Adhoc 查询(即席查询),主要应用场景是数据分析,你可以根据自己的需求写 SQL,查询任何你想查询的数据(前提是你得有权限[手动狗头])。
- Trino 是一个典型的 Master-Slave (主从)架构的计算框架,负责接收用户请求的是 Coordinator,干苦力活的叫 worker
- Trino 是一个 MPP(大规模并行处理) 架构的内存型 OLAP 引擎,注意它只是一个查询引擎,
2. 简单使用
2.1. 启停
- 启停命令
== coordinator的启停控制: bin/launcher start --config=etc/config-coordinator.properties bin/launcher stop bin/launcher restart --config=etc/config-coordinator.properties bin/launcher status -v == worker的启停控制: bin/launcher start --config=etc/config-worker.properties bin/launcher stop bin/launcher restart --config=etc/config-worker.properties bin/launcher status -v
3. 数据类型
3.1. 日期类型
3.1.1. 类型
timestamp with time zone
3.1.2. 日期函数
参考: