当前位置:网站首页>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 .
边栏推荐
- Get parameters in URL
- org. apache. ibatis. exceptions. PersistenceException:
- How to write an infinite loop
- Robotframework rewrite framework add case control
- CANoe. Diva operation guide - establishment of operation environment
- 数字图像处理知识点总结概述
- Canoe learning notes (1)
- Weed FS stress test
- 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
- ECU test modify test case
猜你喜欢

OSI notes sorting

04 disk space management

ASP. Net core uses function switches to control Route Access (Continued) yyds dry inventory

Summary of digital image processing knowledge points

24 pictures to clarify TCP at one time

Invalid bound statement (not found): com. qf. mapper. PassengerMapper. findByPassengerId

"Developer theory" multi system integrated development - rapid nailing of enterprise owned systems

Support JPEG format in GD Library in php7.4

熊市指南|一些本质的教训与具体的生存法则

About the version mismatch of unity resource package after importing the project
随机推荐
org. apache. ibatis. exceptions. PersistenceException:
JS__ Inheritance mode, namespace, object enumeration__ Duyi
智云健康上市在即:长期亏损,美年健康俞熔已退出,未来难言乐观
109 practical shell scripts
Solve the parameter problem that laravels cannot receive wechat callback
Illustration tcp/ip - Chapter 1 and 2 Notes
ASP. Net core uses function switches to control Route Access (Continued) yyds dry inventory
Set eye color
multiplication table
JS disable the browser PDF printing and downloading functions (pdf.js disable the printing and downloading functions)
Big end and small end
C language dynamic memory allocation
What is ARP (address resolution protocol)? (Powercert animated videos)
Working principle and experimental analysis of DHCP
Q5 s905l firmware version 202109
Is there any risk for CICC fortune to open an account? Is it safe to open an account?
Illustration tcp/ip - Chapter 3 and 4 notes
What is a subnet mask? (Powercert animated videos)
Canoe learning notes (2)
C language soul torture: do you know the difference between the two?