How to Debug TiDB with HTAP Capabilities

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

Original topic: 怎么调试有HTAP功能的TiDB

| username: Vector_shine

Where should I find the deployment tutorial?

| username: 啦啦啦啦啦 | Original post link

Are you referring to deploying TiFlash? If so, you can deploy it by scaling out the existing cluster.

| username: Vector_shine | Original post link

I want to install the source code to debug and trace the statement execution process. But now I can only successfully debug TiDB, and it seems that TiFlash is not being used. I don’t know how to debug with HTAP functionality.

| username: TiDBer_jYQINSnf | Original post link

If you want to use TiFlash, you need the table to have TiFlash replicas, and the SQL execution plan should select TiFlash. For example, executing some statistical SQL queries.
Search the documentation on how to use TiFlash.

| username: ShawnYan | Original post link

For source code debugging, take a look here: https://internals.tidb.io/

| username: cy6301567 | Original post link

Add TiFlash replicas with the script, then check the execution plan using EXPLAIN after completion.

| username: zhanggame1 | Original post link

If TiFlash is installed, the table needs to be configured with TiFlash replicas. After synchronization is complete, check the execution plan of the query SQL.