Hints Query TIFLASH 1815 Error

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

Original topic: Hints查询TIFLASH 1815报错

| username: 飞翔的草莓

[TiDB Usage Environment] Production Environment
[TiDB Version] 7.5.0
[Reproduction Path] Operations performed that led to the issue
Constructed TiFlash replica, encountered error after query: “[1815] [HY000]: Internal: Can’t find a proper physical plan for this query”
Executed SQL:
Explain Analyze
select /*+ read_from_storage(TIFLASH[basedata.test]) */ count(1)
from basedata.test;

| username: dba远航 | Original post link

Has the test table enabled TiFlash replicas?

| username: 哈喽沃德 | Original post link

Does the index exist?

| username: 哈喽沃德 | Original post link

Or try using the analyze table command to update the table’s statistics.

| username: 小龙虾爱大龙虾 | Original post link

Can’t keep up with your thinking :rofl:

| username: 飞翔的草莓 | Original post link


| username: 飞翔的草莓 | Original post link

I also tried updating, but I’m not sure if it’s because the data volume is too large. I used 110,000 rows for the statistics update.
Analyze use auto adjusted sample rate 0.000739 for table test, reason to use this rate is “use min(1, 110000/148811828) as the sample-rate=0.0007391885542861553”

| username: tidb菜鸟一只 | Original post link

Try setting tidb_allow_mpp=1.