Trino

Daehee Kim
3 min readAug 26, 2023
  1. Install the Trino in local machine by docker.
docker run -p 8080:8080 — name trino trinodb/trino

2. Connect to the Trino.

docker run -p 8080:8080 --name trino trinodb/trino

PS C:\data> docker exec -it trino trino
trino> show catalogs;
Catalog
---------
jmx
memory
system
tpcds
tpch
(5 rows)

Query 20230826_030442_00000_3p79p, FINISHED, 1 node
Splits: 11 total, 11 done (100.00%)
1.69 [0 rows, 0B] [0 rows/s, 0B/s]

trino> show schemas in tpch;
Schema
--------------------
information_schema
sf1
sf100
sf1000
sf10000
sf100000
sf300
sf3000
sf30000
tiny
(10 rows)

Query 20230826_030517_00001_3p79p, FINISHED, 1 node
Splits: 11 total, 11 done (100.00%)
0.45 [10 rows, 119B] [22 rows/s, 267B/s]

trino> show tables in tpch.sf1;
Table
----------
customer
lineitem
nation
orders
part
partsupp
region
supplier
(8 rows)

Query 20230826_030525_00002_3p79p, FINISHED, 1 node
Splits: 11 total, 11 done (100.00%)
0.52 [8 rows, 158B] [15 rows/s, 302B/s]

trino> use tpch.sf1;
USE
trino:sf1> show tables;
Table
----------
customer
lineitem
nation
orders
part
partsupp
region
supplier
(8 rows)

Query 20230826_030534_00005_3p79p, FINISHED, 1 node
Splits: 11 total, 11 done (100.00%)
0.77 [8 rows, 158B] [10 rows/s, 205B/s]

trino:sf1> select * from nation;
nationkey | name | regionkey | comment
-----------+----------------+-----------+--------------------------------------------------------------------------------------------------------------------
0 | ALGERIA | 0 | haggle. carefully final deposits detect slyly agai
1 | ARGENTINA | 1 | al foxes promise slyly according to the regular accounts. bold requests alon
2 | BRAZIL | 1 | y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special
3 | CANADA | 1 | eas hang ironic, silent packages. slyly regular packages are furiously over the tithes. fluffily bold
4 | EGYPT | 4 | y above the carefully unusual theodolites. final dugouts are quickly across the furiously regular d
5 | ETHIOPIA | 0 | ven packages wake quickly. regu
6 | FRANCE | 3 | refully final requests. regular, ironi
7 | GERMANY | 3 | l platelets. regular accounts x-ray: unusual, regular acco
8 | INDIA | 2 | ss excuses cajole slyly across the packages. deposits print aroun
9 | INDONESIA | 2 | slyly express asymptotes. regular deposits haggle slyly. carefully ironic hockey players sleep blithely. carefull
10 | IRAN | 4 | efully alongside of the slyly final dependencies.
11 | IRAQ | 4 | nic deposits boost atop the quickly final requests? quickly regula
12 | JAPAN | 2 | ously. final, express gifts cajole a
13 | JORDAN | 4 | ic deposits are blithely about the carefully regular pa
14 | KENYA | 0 | pending excuses haggle furiously deposits. pending, express pinto beans wake fluffily past t
15 | MOROCCO | 0 | rns. blithely bold courts among the closely regular packages use furiously bold platelets?
16 | MOZAMBIQUE | 0 | s. ironic, unusual asymptotes wake blithely r
17 | PERU | 1 | platelets. blithely pending dependencies use fluffily across the even pinto beans. carefully silent accoun
18 | CHINA | 2 | c dependencies. furiously express notornis sleep slyly regular accounts. ideas sleep. depos
19 | ROMANIA | 3 | ular asymptotes are about the furious multipliers. express dependencies nag above the ironically ironic account
20 | SAUDI ARABIA | 4 | ts. silent requests haggle. closely express packages sleep across the blithely
21 | VIETNAM | 2 | hely enticingly express accounts. even, final
22 | RUSSIA | 3 | requests against the platelets use never according to the quickly regular pint
23 | UNITED KINGDOM | 3 | eans boost carefully special requests. accounts are. carefull
24 | UNITED STATES | 1 | y final packages. slow foxes cajole quickly. quickly silent platelets breach ironic accounts. unusual pinto be
(25 rows)

Query 20230826_030541_00007_3p79p, FINISHED, 1 node
Splits: 4 total, 4 done (100.00%)
5.40 [25 rows, 0B] [4 rows/s, 0B/s]

--

--