Skip to Content
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
Explore Skills
Cloud Computing
Microsoft Azure
Amazon Web Services (AWS)
Google Cloud
Cloud Migration
Cloud Deployment
Cloud Platforms
Data Engineering
Data Warehouse
SQL
Apache Spark
Microsoft SQL Server
MySQL
Kafka
Data Lake
Streaming & Messaging
NoSQL Databases
Relational Databases
Data Science
Pandas
R
MATLAB
SAS
D3
Power BI
Tableau
Statistics
Exploratory Data Analysis
Data Visualization
AI & ML
Generative AI
Machine Learning
Artificial Intelligence (AI)
Deep Learning
Reinforcement Learning
Natural Language Processing
TensorFlow
Scikit-Learn
Hyperparameter Tuning
MLOps
Programming Languages
Java
JavaScript
Spring
Python
Go
C#
C++
C
Swift
Rust
Functional Programming
Software Architecture
Object-Oriented
Distributed Systems
Domain-Driven Design
Architectural Patterns
IT/Ops
Kubernetes
Docker
GitHub
Terraform
Continuous Delivery
Continuous Integration
Database Administration
Computer Networking
Operating Systems
IT Certifications
Security
Network Security
Application Security
Incident Response
Zero Trust Model
Disaster Recovery
Penetration Testing / Ethical Hacking
Governance
Malware
Security Architecture
Security Engineering
Security Certifications
Design
Web Design
Graphic Design
Interaction Design
Film & Video
User Experience (UX)
Design Process
Design Tools
Business
Agile
Project Management
Product Management
Marketing
Human Resources
Finance
Team Management
Business Strategy
Digital Transformation
Organizational Leadership
Soft Skills
Professional Communication
Emotional Intelligence
Presentation Skills
Innovation
Critical Thinking
Public Speaking
Collaboration
Personal Productivity
Confidence / Motivation
Features
All features
Verifiable skills
AI Academy
Courses
Certifications
Interactive learning
Live events
Superstreams
Answers
Insights reporting
Radar Blog
Buy Courses
Plans
Sign In
Try Now
O'Reilly Platform
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实战
62
|
第
4
章
Presto
使用的
Join
枚举算法更加复杂,不在本书讨论范围内,
Starburst
的博
客文章中对其有详细介绍。这一算法先将问题切分成具有更小分区的子问
题,再递归地寻找正确的
Join
使用,最后将分区结果聚合为一个全局结果。
4.12
使用表统计信息
要充分利用
Presto
的
CBO
,数据必须带有统计信息。没有统计信息,
CBO
能做的非常有
限,它需要数据统计信息以估计行数和不同计划的代价。
因为
Presto
自己不存储数据
,所以统计信息的提供依赖于连接器的实现。在本书编写的时
候,已经有
Hive
连
接器可以向
Presto
提供统计信息,如关系数据库连接器在内的其他数
据源也可以提供统计信息。例如,
PostgreSQL
就
可以收集和存储其数据的统计信息,我们
可以扩展对应的
PostgreSQL
连
接器的实现,以支持将这些信息返回给
Presto
的
CBO
。然
而,撰写本书时还没有这样的开源连接器。我们期望,经过一段时间的发展,会有更多连
接器支持统计信息。你可以持续关注
Presto
的文档以获得这方面的最新信息。
对
Hive
连接器来说,你可以使用以下方法收集统计信息。
•
使用
Presto
的
ANALYZE
命令来收集统计信息。
•
启用
Presto
在将数据写入表时收集统计信息的功能。
•
使用
Hive
的
ANALYZE
命令来收集统计信息。
重要的是,
Presto
将统计信息存储在
HiveMetastore
中,这也是
Hive
存储统计信息的地方。
如果你在
Hive
和
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.
Start your free trial
You might also like
大数据项目管理:从规划到实现
Ted Malaska, Jonathan Seidman
数据库系统内幕
Alex Petrov
云原生:运用容器、函数计算和数据构建下一代应用
Boris Scholl, Trent Swanson, Peter Jausovec
Google系统架构解密: 构建安全可靠的系统
Heather Adkins, Betsy Beyer, Paul Blankinship, Piotr Lewandowski, Ana Oprea, Adam Stubblefield
Publisher Resources
ISBN: 9787115560056