About insert into select sql does not use tiflash problem description
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
tidb v8.2.0 Use jmeter to call about 10 SQL statements for stress testing. The stress testing logic is that the SQL statements are run serially once.About half of the SQL types are insert into xxx select x,x,xx,x,x from a,b where a.id=b.id;One of the problems I encountered was that one of the sql select statements did not use tiflash. (I know that in bulk mode, sql_mode needs to be set to non-strict mode.)
### 1. Minimal reproduce step (Required)
1.1、set global sql_mode="";
1.2、Write sql process in jemeter and run sql one by one,Related SQL plus hint set_var(tidb_dml_type=bulk).
### 2. What did you expect to see? (Required)
sql can take the optimal execution plan
### 3. What did you see instead (Required)
One of the SQL queries does not use tiflash (insert into xxx select x,x,xx,x,x from a,b where a.id=b.id;)
The warning message in the slow query log is No available path for table xxx.xx with the store type tiflash of the hint /*+ read_from_storage(x,xx) */. All the tables related to this SQL have tiflash copies enabled and have been analyzed.
The solution at that time was to add a set session sql_mode='' to this sql separately in jmeter to solve the problem。
Expectations are:
1. The prompt information can be more friendly;
2. This problem is very sporadic. In theory, when JMeter stress tests several SQL statements, it should not be the only SQL statement that has a problem.
### 4. What is your TiDB version? (Required)
v8.2.0
Contributor guide
Assessment
This issue has not been assessed yet.