Skip to Content
Presto实战
book

Presto实战

by Matt Fuller, Manfred Moser, Martin Traverso
March 2021
Intermediate to advanced
265 pages
6h 50m
Chinese
Posts & Telecom Press
Content preview from Presto实战
高级连接器实例
113
这个逻辑查询计划类似于图
7-5
。可以看到这个计划包括扫描
flights_orc
表和
airport
表。这两个输入都被送入
Join
算子中。但在将机场数据送入
Join
算子之前,我们会应用
一个
Filter
算子,因为我们只想查看
Alaska
机场的结果。在
Join
之后,应用了聚合和分
组操作。最后由
TopN
算子将
ORDER BY
LIMIT
一并完成。
7-5:联邦查询的逻辑查询计划
为了从
PostgreSQL
中检索数据,
Presto
通过
JDBC
发送一个查询。例如,最原始的方法是
将下面的查询发送到
PostgreSQL
SELECT * FROM airline.airport;
然而,
Presto
比这更聪明,
Presto
优化器会试图减少系统间传输的数据量。在这个例子中,
Presto
只从
PostgreSQL
表中查
询它所需要的列,同时将谓词下推到发送至
PostgreSQL
SQL
中。
因此,现在从
Presto
发送到
PostgreSQL
的查询会将更多的处理推送到
PostgreSQL
SELECT code, city, name FROM airline.airport WHERE state = 'AK';
当到
PostgreSQL
JDBC
连接器返回数据到
Presto
时,
Presto
会继续处理在
Presto
查询引
擎中执行的部分。
一些比较简单的查询,如
SELECT * FROM public.airport
,会完全下推到底层数据源中,
如图
7-6
所示,这样查询的执行就发生在
Presto ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

大数据项目管理:从规划到实现

大数据项目管理:从规划到实现

Ted Malaska, Jonathan Seidman
机器学习流水线实战

机器学习流水线实战

Hannes Hapke, Catherine Nelson

Publisher Resources

ISBN: 9787115560056