Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 禁用tiflash
【TiDB Usage Environment】Production Environment
【TiDB Version】6.1.0
set session tidb_isolation_read_engines=‘tidb,tikv’;
This can only disable TiFlash at the session level. Is there a way to disable TiFlash globally?
After using TiFlash, the script actually consumes more memory in the TiDB server.
You need to edit the configuration file parameter isolation-read.engines.
isolation-read
Configuration items related to isolation read.
engines
- Used to control which types of engines TiDB nodes are allowed to read data from.
- Default value: [“tikv”, “tiflash”, “tidb”], indicating that the optimizer automatically selects the storage engine.
- Optional values: combinations of “tikv”, “tiflash”, “tidb”, such as [“tikv”, “tidb”], [“tiflash”, “tidb”].
Modify the configuration file, and then restart the tidb_server node, right?
I tested it, and after restarting TiDB, the changes were not successful. I don’t know why.

Is the parameter name written incorrectly?
Is it supposed to be isolation-read?
isolation-read.engines
It should be this one, right?
I made a mistake, it’s isolation-read.engines. Just reload after changing it.
Has anyone encountered that after adding TiFlash, the memory usage actually increased?
It will definitely take up more memory.
What is the principle behind this? 
TiFlash, just by looking at the name, follows the approach of using more memory and increasing data caching to speed up performance.
TiFlash consumes a lot of memory, I have never installed it.
Previously consulted with the official technical team, and they said that adding all the tables in SQL to TiFlash would save more memory.
It should be saved by column pruning.
Directly use ALTER DATABASE database_name SET TIFLASH REPLICA 0
to remove TiFlash replicas, so queries will no longer go to TiFlash.