Should not use Cop request
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
It is supposed to use MPP or Batch Cop instead of Cop to run this query, as it is very slow.
`SELECT UserID FROM hits.hits WHERE UserID = 435090932899640449;`
### 1. Minimal reproduce step (Required)
https://github.com/ClickHouse/ClickBench
### 2. What did you expect to see? (Required)
### 3. What did you see instead (Required)


### 4. What is your TiDB version? (Required)
```
mysql> select * from CLUSTER_INFO;
+---------+-------------------+-------------------+-------------+------------------------------------------+---------------------------+--------------------+-----------+
| TYPE | INSTANCE | STATUS_ADDRESS | VERSION | GIT_HASH | START_TIME | UPTIME | SERVER_ID |
+---------+-------------------+-------------------+-------------+------------------------------------------+---------------------------+--------------------+-----------+
| tidb | 172.16.5.82:44000 | 172.16.5.82:40080 | 6.2.0-alpha | 39e00ebe0784567d6bb2511578c7c57633f50698 | 2022-08-16T15:53:04+08:00 | 3h46m25.394341301s | 13986 |
| tidb | 172.16.5.59:44000 | 172.16.5.59:41080 | 6.2.0-alpha | 39e00ebe0784567d6bb2511578c7c57633f50698 | 2022-08-16T15:53:11+08:00 | 3h46m18.394345739s | 1391661 |
| pd | 172.16.5.59:42379 | 172.16.5.59:42379 | 6.2.0-alpha | 750aada580eb718a12eefe04523e3b0b3f6d4169 | 2022-08-16T15:52:26+08:00 | 3h47m3.394347509s | 0 |
| tikv | 172.16.5.59:40160 | 172.16.5.59:40180 | 6.2.0-alpha | 8be9d449b6cf86a5e4731d032ba1d8cd7f736da8 | 2022-08-16T15:52:47+08:00 | 3h46m42.394349418s | 0 |
| tikv | 172.16.5.81:40160 | 172.16.5.81:40180 | 6.2.0-alpha | 8be9d449b6cf86a5e4731d032ba1d8cd7f736da8 | 2022-08-16T15:52:50+08:00 | 3h46m39.394350899s | 0 |
| tiflash | 172.16.5.81:43930 | 172.16.5.81:40292 | 6.2.0-alpha | 577aadae6b4cb7a4db43cb5fddf330d4d254e641 | 2022-08-16T19:01:51+08:00 | 37m38.394352261s | 0 |
| tikv | 172.16.5.82:40160 | 172.16.5.82:40180 | 6.2.0-alpha | 8be9d449b6cf86a5e4731d032ba1d8cd7f736da8 | 2022-08-16T15:52:36+08:00 | 3h46m53.394353739s | 0 |
+---------+-------------------+-------------------+-------------+------------------------------------------+---------------------------+--------------------+-----------+
7 rows in set (0.01 sec)
mysql> SELECT tidb_version();
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v6.2.0-alpha
Edition: Community
Git Commit Hash: 39e00ebe0784567d6bb2511578c7c57633f50698
Git Branch: heads/refs/tags/v6.2.0-alpha
UTC Build Time: 2022-08-15 14:36:04
GoVersion: go1.18.5
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: tikv |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
```
Contributor guide
Assessment
This issue has not been assessed yet.