当前位置:网站首页>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
边栏推荐
- Package management tools --npm, -cnpm, -yan, -cyarn
- 【ARM】讯为rk3568开发板lvds屏设置横屏显示
- 口令安全是什么意思?等保2.0政策中口令安全标准条款有哪些?
- Sword finger offer 11 Minimum number of rotation array
- Express、路由(Route)、Request对象、Response对象、中间件、EJS模板
- Php7.3 error undefined function simplexml_ load_ string()
- LeetCode_ Backtracking_ Dynamic programming_ Medium_ 131. split palindrome string
- 'dare not doubt the code, but have to doubt the code 'a network request timeout analysis
- [go] go language interface
- Various schemes for lazy loading of pictures
猜你喜欢
随机推荐
PHP7.3报错undefined function simplexml_load_string()
防抖&节流 加强版
Customize multi-level list styles in word
冒泡排序 指针
昆仑分布式数据库技术优势
To establish a cloud computing "Kunlun", why should Lenovo hybrid cloud Lenovo xcloud?
OLAP - Druid introduction
Good things to share
OJ daily practice - spanning 2020
LeakCanary 源码详解(2)
使用smart-doc自动生成接口文档
OJ daily practice - word length
OJ每日一练——单词的长度
周国华 读书随记
ES5 Object的扩展方法//call、apply 和 bind
Sword finger offer 07 Rebuild binary tree
Tianyi cloud takes advantage of the new infrastructure to build a "4+2" capability system for digital transformation
【GO】Go Modules入门
【GO】Go Modules入門
tp5.1解决跨域








