当前位置:网站首页>Kunlundb query optimization (I)
Kunlundb query optimization (I)
2022-06-22 23:49:00 【Kunlunbase Kunlun database】
front said
Previously, I introduced KunlunDB Architecture and technology of , Some friends should be curious about the process of query optimization , This chapter introduces the specific process of query optimization , An example will be given later to demonstrate .
Of course, the follow-up will also be on KunlunDB Other technical aspects of ( For example, data fragmentation ) Make an example demonstration , In order to facilitate everyone to understand KunlunDB.
Query optimization process
KunlunDB It is a distributed database system that separates computing and storage , When a query SQL Send to KunlunDB Any computing node (CN) when ,KunlunDB Syntax parser (Parser) First, the original query text will be parsed and some simple legitimacy verification , After that, the query will be logically optimized : Such as query rewriting , Area pruning , Column cut , Predicate pushdown, etc .
KunlunDB In the process of logic optimization, the strategy of maximum push down will be adopted .
Calculating push down can not only avoid CN and DN The data network interaction between can also make full use of the ability of multi slice concurrent execution and various functions DN resources , Speed up queries .
The optimized operators are divided into two categories :
Operators that can be pushed down :RemoteScan Push the operator to the corresponding data node for execution , After execution, pull the corresponding data to the calculation node for subsequent processing . Operators that support push down include : Filter conditions , Such as WHERE or HAVING Conditions in . Aggregation operator , Such as COUNT,GROUP BY etc. , The aggregation calculation will be carried out in two stages . Sort operator , Such as ORDER BY,JOIN And subquery .Project, Projection operation .Distinct Weight removal .
Some operators that cannot be pushed down : Such as span shard Of join, You need to pull data from the data node to the calculation node for calculation , The optimizer will choose the best way to execute , Such as choosing the appropriate parallelism strategy
The global execution process is as follows :

The optimization process is as follows :

The maximum push down strategy is as follows :



review : For maximum performance , When defining partition keys, we should fully consider the execution of business SQL The scene of the statement , To minimize cross node data operations .
The project is open source
【GitHub:】
https://github.com/zettadb
【Gitee:】
https://gitee.com/zettadb
-END
边栏推荐
- 考过HCIP依然转行失败,职业网工最看重的到底是什么
- Tianyi cloud takes advantage of the new infrastructure to build a "4+2" capability system for digital transformation
- 【GO】Go数组和切片(动态数组)
- Customize multi-level list styles in word
- DML:Data Manipulation Language 数据操纵语言
- Safe and reliable! Tianyi cloud data security management platform passed the evaluation
- 1. class inheritance (point)
- DCC888 :SSA (static single assignment form)
- swagger2 使用方法
- 斐波那契数列合集
猜你喜欢

OJ daily practice - filter extra spaces

程序员接私活兼职选择

10 Super VIM plug-ins, I can't put them down

OJ daily practice - spanning 2020
![[go] go mod mode, package 12import/add is not in goroot](/img/b5/4cf5d3f04d0e5cc6f5a957959022ec.png)
[go] go mod mode, package 12import/add is not in goroot

wallys/WiFi6 MiniPCIe Module 2T2R 2 × 2.4GHz 2x5GHz

After passing the hcip exam, I still failed to change my career. What do professional network workers value most

swagger2 使用方法

DCC888 :SSA (static single assignment form)

Learning the interpretable representation of quantum entanglement, the depth generation model can be directly applied to other physical systems
随机推荐
After passing the hcip exam, I still failed to change my career. What do professional network workers value most
Problèmes rencontrés lors de l'utilisation de redistemplate
Webrtc series - 4connection sorting of network transmission
Anti shake & throttling enhanced version
[PHP] PHP polymorphism
Redis缓存
双重跨域:Access-Allow-Origin header contains multiple values“*, *”,but only one is allowed
剑指 Offer 05. 替换空格
好东西要分享啦
[go] getting started with go modules
OLAP ——Druid简介
异步FIFO
Eslint simple configuration
14. 最长公共前缀
包管理工具--NPM、--CNPM、 --Yarn、 --CYarn
10 Super VIM plug-ins, I can't put them down
OJ每日一练—— 班级就餐
Thead Safety心得体会
C language greedy snake
昆仑分布式数据库独特的变量读写功能介绍