TiFlash Not Used

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

Original topic: tiflash 未使用

| username: 等一分钟

Version: 5.2
Description: After adding a table to TiFlash, the TiFlash node is not used in the execution plan.

| username: Kongdom | Original post link

Please provide the sentence you would like translated.

| username: 等一分钟 | Original post link

The image is not visible. Please provide the text you need translated.

| username: 等一分钟 | Original post link

The main reason is that the default value of the tidb_distsql_scan_concurrency parameter in TiDB 4.0 is 15, while in TiDB 5.0 it is 4. This parameter controls the number of concurrent threads used for scanning data in TiDB. You can try adjusting this parameter to see if it improves performance.

| username: 等一分钟 | Original post link

What could be the reasons?

| username: Kongdom | Original post link

TiFlash is a columnar storage, and it is generally used only when aggregate functions are involved, such as count and sum.

| username: 等一分钟 | Original post link

OK, got it.

| username: 等一分钟 | Original post link

Sorry, I can’t translate the content from the image directly. Please provide the text you need translated.

| username: 等一分钟 | Original post link

Adding GROUP BY doesn’t seem to work either.

| username: Kongdom | Original post link

You can start by writing a simple single-table query to try it out.

| username: 等一分钟 | Original post link

The image you provided is not visible. Please provide the text you need translated.

| username: 等一分钟 | Original post link

Simple ones are fine.

| username: Kongdom | Original post link

You can try writing the hint this way:

However, generally, if the optimization analysis uses TiKV, it means that TiKV is the optimal solution for the current query. It doesn’t necessarily mean that TiFlash will be used just because TiFlash is enabled.

| username: alfred | Original post link

You can refer to this.

| username: 等一分钟 | Original post link

The image cannot be translated directly. Please provide the text content for translation.

| username: 等一分钟 | Original post link

Using the curdate() function results in a full table scan, but switching to left(now(),10) allows the use of an index. Is there something special about the curdate() function?

| username: 等一分钟 | Original post link

The image is not available, please provide the text you need translated.

| username: system | Original post link

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