How to specify storage in TiFlash instead of letting it intelligently choose between KV and TiFlash

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

Original topic: tiflash不想智能选择存储kv还是tiflash,想指定存储tiflash 如何操作

| username: xiaoxiaozuofang

【TiDB Usage Environment】Production Environment / Testing / POC
【TiDB Version】v6.1.0
【Reproduction Path】Operations performed that led to the issue
【Encountered Issue: Issue Description and Impact】
【Resource Configuration】
【Attachments: Screenshots / Logs / Monitoring】

| username: xfworld | Original post link

The data source of TiFlash is TiKV, which cannot be bypassed…

When configuring the synchronization strategy for TiFlash, it also performs both full and incremental synchronization from TiKV…

| username: xiaoxiaozuofang | Original post link

It means not wanting to achieve column storage by executing SQL - ALTER TABLE table_name SET TIFLASH REPLICA count.

| username: xiaoxiaozuofang | Original post link

There is no global variable setting switch; directly specify certain databases to implement TiFlash column storage.

| username: xiaoxiaozuofang | Original post link

How to specify a certain database to use TiFlash column storage?

| username: xfworld | Original post link

Not supported

Was my answer not clear enough? This should be sufficient :see_no_evil:

| username: xiaoxiaozuofang | Original post link

What I mean is, besides executing the SQL command - ALTER TABLE table_name SET TIFLASH REPLICA count, is there any other way to achieve this?

| username: xfworld | Original post link

Definitely not… :see_no_evil:

| username: Kongdom | Original post link

I remember it was mentioned at the conference that TiFlash might be supported as an independent storage engine in the future. Stay tuned~

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

You can specify queries to use TiFlash, but you cannot write only to TiFlash without writing to TiKV.

| username: xiaoxiaozuofang | Original post link

How to specify a query to use TiFlash?

| username: Kongdom | Original post link

Engine isolation is specified by configuring variables to ensure that all queries use the specified engine’s replica. The optional engines are “tikv”, “tidb”, and “tiflash” (where “tidb” refers to TiDB’s internal memory table area, mainly used for storing some TiDB system tables, and cannot be actively used by users).

| username: hey-hoho | Original post link

Starting from version 6.0, it is already supported to build TiFlash replicas for the entire database without needing to operate on each table individually:

ALTER DATABASE db_name SET TIFLASH REPLICA count;
| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.