当前位置:网站首页>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 .
边栏推荐
- Virtualenvwrapper solves the installation error, and virtualenvwrapper is permanently effective
- Please enter an integer and output it as several digits, and output each digit in reverse order.
- Simulate ATM system (account opening, login, account query, withdrawal, deposit, transfer, password modification, account cancellation)
- Illustration tcp/ip - Chapter 3 and 4 notes
- UDP Vs TCP (Powercert animated videos)
- [nailing - scenario capability package] nailer card
- The robot framework calls the JS interface and gets the return value
- JS__ Inheritance mode, namespace, object enumeration__ Duyi
- On ACM competition
- Ecu-test report converted to excel format
猜你喜欢

Canoe learning notes (3)

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

01 network basics

Dbeaver offline installation driver

Simple record of fire & spell effects

24 pictures to clarify TCP at one time

Win11开始菜单右键空白?Win11开始菜单右键没反应解决方法

Mathematical analysis_ Notes_ Chapter 4: continuous function classes and other function classes

用idea建立第一个网站

Canoe learning notes (1)
随机推荐
[important notice] developer document update (12.13-12.19)
Zhiyun health is about to go public: long-term losses, meinian health Yu Rong has withdrawn, and it is difficult to be optimistic about the future
Using recursive method to find the value of 1~n
On merging and sorting
How to write an infinite loop
mysql 通过sql 修改多表增加多个字段
Summary of several methods for FPS calculation
The robotframework executes CMD commands and bat scripts
Mathematical analysis_ Notes_ Chapter 4: continuous function classes and other function classes
Win11录屏数据保存在哪里?Win11录屏数据保存的位置
Winget: the "Winget" item cannot be recognized as the name of cmdlet, function, script file or runnable program. Win11 Winget cannot be used to solve this problem
OBD Position Overview
挖财证券开户安全嘛?
Kubernetes related knowledge - surprise interview
JVM Foundation
[nailing scenario capability package] manage the on-the-job / off-the-job situation of employees
Free your hands and automatically brush Tiktok
Canoe learning notes (4)
Is it safe to fry stocks with compass or securities software? Where can I open an account and how
[nailing scenario capability package] enterprise and public institution intelligent access control