Manual hit not effective

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

Original topic: 手工hit不生效

| username: TiDBer_ZfFjmcZo

[Test Environment] Testing environment
[TiDB Version] 6.4.0
[Reproduction Path]
[Encountered Problem: Phenomenon and Impact] Manual hint not effective
The following operations have been performed, but read_from_storage in the hint is still not effective:

  1. Client started with mysql -h 127.0.0.1 -P 4000 -uroot --comments
  2. Both tables have tiflash replicas
  3. tidb_isolation_read_engines configured as [tidb, tikv, tiflash]
    [Resource Configuration]
| username: BraveChen | Original post link

Does this table have TiFlash replicas?

| username: 特雷西-迈克-格雷迪 | Original post link

Add the database name before the table.

| username: Kongdom | Original post link

First, confirm whether there is a TiFlash replica. If there is no replica, it will not be hit.

| username: TiDBer_ZfFjmcZo | Original post link

There are replicas.

| username: TiDBer_ZfFjmcZo | Original post link

There are replicas~.

| username: TiDBer_ZfFjmcZo | Original post link

Why doesn’t the automatic optimizer use TiFlash?

| username: WalterWj | Original post link

First, try setting the engine to TiDB or TiKV and check the execution plan. If it can use TiFlash, there might be an issue with the hint you added.

| username: TiDBer_ZfFjmcZo | Original post link

Just add the database name before the table.

| username: 特雷西-迈克-格雷迪 | Original post link

Dear comrade, could you provide the best answer? As for why not use TiFlash, it’s because the optimizer thinks using TiKV is more advantageous.

| username: wzf0072 | Original post link

Isn’t Hint mandatory?

| username: 考试没答案 | Original post link

If the hint is written incorrectly or is not very good, you can choose not to use it. I remember it being like this. It’s not mandatory, right?

| username: system | Original post link

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