当前位置:网站首页>Processing of limit operator in Presto
Processing of limit operator in Presto
2022-06-25 21:41:00 【Wangfeihuo】
One . Preface
This article mainly explores in Presto How to deal with Limit Operator's . With simple Hive Data source query select * from testlimit limit 2 Take as an example to discuss in Presto in Limit 2 How to apply to TableScan Of . We can learn from this article limit Operator down to Hive Data sources TableScan after ,TableScan How is it handled .
Two . belt Limit Operator's plan execution tree
stay Presto in ,Limit Operator passing RBO After optimization, it will be pushed down to the position as close to the data source as possible . The above SQL After optimization , Last generated operator The sequence of operations is :

Although this picture looks like TableScan After reading all the data , after Limit Filter , And then to the downstream . But in Presto in , The implementation is not like this , Because it will lead to TableScan There is considerable resource consumption, resulting in slower query efficiency .
stay Presto in , It's using pipeline Execution mode of . in other words ,TableScan Every time you sweep one Page The data of , Send it to the downstream immediately Limit Operation,Limit Operator After operation , Also send it to the downstream immediately . At the same time ,TableScan Will also continue to scan the next page The data of , Week after week .
3、 ... and . TableScan How to deal with Limit Operator's
The following details are described in Presto The middle is the upper Limit Push down to TableScan after ,TableScan How is it handled .

It can also be seen from the picture above , stay TableScan in , Will not scan out all the data before giving it to Limit operator , But one by one Page scanning , The scanned data is greater than Limit After the number of ,Limit The operator informs TableScan Stopped scanning , Never reduce the amount of data scanned .
边栏推荐
- Q5 s905l firmware version 202109
- C language dynamic memory allocation
- Canoe learning notes (2)
- ASP. Net core uses function switches to control Route Access (Continued) yyds dry inventory
- 数字图像处理知识点总结概述
- Apache uses setenvif to identify and release the CDN traffic according to the request header, intercept the DDoS traffic, pay attention to the security issues during CDN deployment, and bypass the CDN
- Opentelemetry architecture and terminology Introduction (Continued)
- Free cloud function proxy IP pool just released
- Summary of digital image processing knowledge points
- The latest (2022-2-16) vulnerability of WordPress plug-in bee collection (XSS, WordPress user name exposure, arbitrary article publishing) is repeated
猜你喜欢

Using two stacks to realize the function of one queue?

What is a subnet mask? (Powercert animated videos)

Differences between modems and routers (powercert animated videos)

PHP Chinese word segmentation API, Harbin Institute of technology ltpcloud, naturallanguageprocessing, free, best practices!

Legal mix of settlements (utf8mb4_0900_ai_ci, implicit) and (utf8mb4_general_ci, implicit) error resolution

Jmeter- (I) installation of interface test

Get parameters in URL

JS disable the browser PDF printing and downloading functions (pdf.js disable the printing and downloading functions)

org. apache. ibatis. exceptions. PersistenceException:

Free cloud function proxy IP pool just released
随机推荐
ASC - DAY2
Free your hands and automatically brush Tiktok
Bat script simple command
Win11无法删除文件夹怎么办?Win11无法删除文件夹的解决方法
熊市指南|一些本质的教训与具体的生存法则
Write a "standard" macro min, which inputs two parameters and returns the smaller one
How testers write functional test cases
[nailing scenario capability package] ranking of enterprise employees' points
IPv4 and IPv6 (powercert animated videos)
HNU数据库系统概论 ODBC
CANoe. Diva operation guide TP layer test
[nailing scenario capability package] video conference (official conference system)
挖财证券开户安全嘛?
The latest (2022-2-16) vulnerability of WordPress plug-in bee collection (XSS, WordPress user name exposure, arbitrary article publishing) is repeated
mysql 通过sql 修改多表增加多个字段
Order by keyword syntax problems encountered in SQL Server learning
If switch branch structure
Canoe learning notes (1)
Docker Alpine image installation PHP extension redis
How to solve the problem of flash write protection in STM32?