Does the Tiflash Replica Setting Affect Query Speed?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: Tiflash副本设置对查询速度有无影响

| username: jingyesi3401

【TiDB Usage Environment】Production Environment

【TiDB Version】v5.1.0

【Encountered Issue】In the production environment, TiFlash is set to one replica. Users report slow query speeds and want to know if setting it to two replicas will improve query speed. Is there a direct relationship between query speed and the number of replicas?

| username: songxuecheng | Original post link

I remember it had no impact before. My personal suggestion is to set the number of replicas according to the number of TiFlash machines. Currently, the number of replicas is only related to high availability and does not affect query performance.

| username: BraveChen | Original post link

Setting TiFlash replicas will speed up queries for OLAP-type workloads.

| username: BraveChen | Original post link

Correct.

| username: ddhe9527 | Original post link

The number of replicas has no impact on MPP performance, but the number of TiFlash nodes does affect MPP performance.

| username: Kongdom | Original post link

I don’t think there is a direct impact.

| username: 我是咖啡哥 | Original post link

If the query concurrency is relatively high, having multiple TiFlash nodes and replicas can naturally improve performance.

| username: CuteRay | Original post link

No impact, the number of replicas is related to high availability, increasing replicas will not improve query performance. Usually, setting two replicas for TiFlash is sufficient.