Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 手工hit不生效
[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:
- Client started with mysql -h 127.0.0.1 -P 4000 -uroot --comments
- Both tables have tiflash replicas
- tidb_isolation_read_engines configured as [tidb, tikv, tiflash]
[Resource Configuration]
Does this table have TiFlash replicas?
Add the database name before the table.
First, confirm whether there is a TiFlash replica. If there is no replica, it will not be hit.
Why doesn’t the automatic optimizer use TiFlash?
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.
Just add the database name before the table.
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.
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?
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.