当前位置:网站首页>Kunlundb query optimization (III) sort push down
Kunlundb query optimization (III) sort push down
2022-06-22 23:49:00 【Kunlunbase Kunlun database】
Preface
front 2 In this article, we introduce KunlunDB Query optimization principle and Project and Filter Push down Demo (KunlunDB Query optimization ( One ),KunlunDB Query optimization ( Two )Project and Filter Push down ), This section describes sorting and query optimization .
One 、order by Push down
One contains order Of SQL The execution plan of is generated in the following process ,Sort Pushed down to RemoteScan Inside the operator .
Sort The push down operation is asynchronous , Instructions are executed in parallel at each data node , After filtering the data , Feed back the sorted results to the calculation node , Reduce the load of computing nodes .

Let's test and view the execution plan pushed down by query
Push down to support sorting , Need to be in kunlunDB Set the following parameters as true:
set enable_remote_orderby_pushdown=true;
Test statement :
select c_zip from customer1 order byc_zip;View execution plan :
explain select c_zip fromcustomer1 order by c_zip;
According to the above implementation plan ,RemoteScan After communicating the remote sort operation to each relevant storage node , The storage node feeds back the result to the computing node and then does the operation Merge Append.
If the sort push down feature is turned off , The implementation plan will change , The sorting operation will be performed at the calculation node .
The demonstration is as follows :
set enable_remote_orderby_pushdown=false;The sorting operation will be performed at the calculation node :

Statement execution : Statement after the calculation node is rewritten , Send it to 2 Multiple data nodes execute , Pull the qualified value from the calculation node to sort the calculation node , Feedback to the client after sorting .
Two 、 Performance comparison
Performance comparison environment :
Copy the link below to log in kunlunDB Online experience system :
zettatech.tpddns.cn:8000/ci/index.php/Main/PGList
stay SQL Enter the statement of sorting operation in the box , Press the execute key to execute .
The left window is KunlunDB Implementation information of community version ( The community version does not support sorting and pushing down ), The window on the right is KunlunDB The enterprise version has the execution information of push down operation .

The comparison shows that ,order by Push down and back , Execution efficiency has improved ( The execution time is 4 Milliseconds down to 3 millisecond )
The project is open source
【GitHub:】
https://github.com/zettadb
【Gitee:】
https://gitee.com/zettadb
END
边栏推荐
- After passing the hcip exam, I still failed to change my career. What do professional network workers value most
- Oracle ASM uses the CP command in asmcmd to perform remote replication
- KunlunDB 查询优化(一)
- swagger2 使用方法
- Programmers' choice of taking private jobs and part-time jobs
- Webrtc series - 4connection sorting of network transmission
- Package management tools --npm, -cnpm, -yan, -cyarn
- 剑指 Offer 05. 替换空格
- Reddit's discussion on lamda model: it is not stateless. It adopts a dual process. Compared with the way it edits Wikipedia, it doesn't matter whether it has feelings or not
- OJ daily exercise - virus proliferation
猜你喜欢

C language greedy snake

Digital data was invited to participate in Nantong enterprise digital transformation Seminar

LeakCanary 源码详解(2)

Safe and reliable! Tianyi cloud data security management platform passed the evaluation

JSBridge

在Word中自定义多级列表样式

异步FIFO

【STM32技巧】使用STM32 HAL库的硬件I2C驱动RX8025T实时时钟芯片

昆仑分布式数据库独特的变量读写功能介绍

OLAP - Druid introduction
随机推荐
[kubernetes series] overview of kubernetes
How to use swagger2
Digital data depth | about software self-control, source code left, no code right
Leakcanary source code (2)
Oracle ASM使用asmcmd中的cp命令来执行远程复制
XML escape character cross reference table
OJ daily practice - sorting and naming
Es5 object extension methods //call, apply and bind
ES5 Object的扩展方法//call、apply 和 bind
Dml:data manipulation language
WebRTC系列-网络传输之4Connection排序
KunlunDB查询优化(三)排序下推
Various schemes for lazy loading of pictures
MySQL-Seconds_behind_master 的精度误差
双重跨域:Access-Allow-Origin header contains multiple values“*, *”,but only one is allowed
Problèmes rencontrés lors de l'utilisation de redistemplate
Express、路由(Route)、Request对象、Response对象、中间件、EJS模板
斐波那契数列合集
异步FIFO
剑指 Offer 07. 重建二叉树