当前位置:网站首页>TiFlash 性能调优
TiFlash 性能调优
2022-07-17 14:46:00 【添香小铺】
本文介绍了使 TiFlash 性能达到最优的几种方式,包括规划机器资源、TiDB 参数调优、配置 TiKV Region 大小等。
资源规划
对于希望节省机器资源,并且完全没有隔离要求的场景,可以使用 TiKV 和 TiFlash 联合部署。建议为 TiKV 与 TiFlash 分别留够资源,并且不要共享磁盘。
TiDB 相关参数调优
对于 OLAP/TiFlash 专属的 TiDB 节点,建议调大读取并发数 tidb_distsql_scan_concurrency 到 80:
set @@tidb_distsql_scan_concurrency = 80;开启 Super batch 功能:
tidb_allow_batch_cop 变量用来设置从 TiFlash 读取时,是否把 Region 的请求进行合并。当查询中涉及的 Region 数量比较大,可以尝试设置该变量为
1(对带aggregation下推到 TiFlash Coprocessor 的请求生效),或设置该变量为2(对全部下推到 TiFlash Coprocessor 请求生效)。set @@tidb_allow_batch_cop = 1;尝试开启聚合推过
Join/Union等 TiDB 算子的优化:tidb_opt_agg_push_down 变量用来设置优化器是否执行聚合函数下推到 Join 之前的优化操作。当查询中聚合操作执行很慢时,可以尝试设置该变量为 1。
set @@tidb_opt_agg_push_down = 1;尝试开启
Distinct推过Join/Union等 TiDB 算子的优化:tidb_opt_distinct_agg_push_down 变量用来设置优化器是否执行带有
Distinct的聚合函数(比如select count(distinct a) from t)下推到 Coprocessor 的优化操作。当查询中带有Distinct的聚合操作执行很慢时,可以尝试设置该变量为1。set @@tidb_opt_distinct_agg_push_down = 1;
边栏推荐
- What do you look at after climbing the wall? The most popular foreign website - website navigation over the wall
- 565. Array nesting: regular simulation questions
- Mysql索引的类型(单列索引、组合索引 btree索引 聚簇索引等)
- mysql show processlist 详解
- cv02-roge矩阵,旋转向量 ,角度
- 每日刷题记录 (二十六)
- Powercli script performance optimization
- Leetcode 1252. 奇数值单元格的数目
- Leetcode 1310. 子数组异或查询
- A curated list of awesome Qt and QML
猜你喜欢

Powercli script performance optimization

Four methods of traversing key value in map
![[multithreading] detailed explanation of JUC (callable interface, renntrantlock, semaphore, countdownlatch), thread safe set interview questions](/img/3a/b0bdf66e11e66234a222d977fd933c.png)
[multithreading] detailed explanation of JUC (callable interface, renntrantlock, semaphore, countdownlatch), thread safe set interview questions

性能优化之@Contended减少伪共享

A fastandrobust convolutionalneuralnetwork-based defect detection model inproductqualitycontrol-閱讀筆記

Leetcode 1304. N different integers with zero and

Introduction of database lock, shared with InnoDB, exclusive lock

【二叉树】之力扣牛客必刷题
![[untitled] CV learning 1 conversion](/img/22/55d171f49659e704951ebd82a33f06.png)
[untitled] CV learning 1 conversion

Sword finger offer II 041 Average value of sliding window
随机推荐
Dream CMS foreground search SQL injection
pjudge#21652-[PR #4]到底有没有九【数位dp】
466-82(3、146、215)
02-2、缺省参数、函数重载、引用、隐式类型转换、关于报错
Mysql优化系列之limit查询
Resources for physics based simulation in computer graphics
Play with the one-stop scheme of cann target detection and recognition
QT two overloaded qlistwidget control objects implement selectitem drag drag
Total number of blocking and waiting in jconsole thread panel (RPM)
委派雙親之類加載器
JVM hook hooks function
梦想CMS 前台搜索SQL注入
A fastandrobust convolutionalneuralnetwork-based defect detection model inproductqualitycontrol-閱讀筆記
Hello JSON Schema
【多线程】JUC详解 (Callable接口、RenntrantLock、Semaphore、CountDownLatch) 、线程安全集合类面试题
学习笔记3--规划控制中的机器学习基本思想
Similarities and differences between OA system and MES system
[PostgreSQL] PostgreSQL 15 optimizes distinct
Leetcode 1328. 破坏回文串(可以,已解决)
Docker安装MySQL