`estRows` are not same between unistore and tikv
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
```
set sql_mode='';
CREATE TABLE t1(a enum('a','b','c','d'));
INSERT INTO t1 VALUES (4),(1),(0),(3);
analyze table t1;
explain SELECT a FROM t1 WHERE a=0;
```
### 2. What did you expect to see? (Required)
The plans are same.
### 3. What did you see instead (Required)
The plans are different
unistore
```
mysql> explain SELECT a FROM t1 WHERE a=0;
+-------------------------+---------+-----------+---------------+------------------+
| id | estRows | task | access object | operator info |
+-------------------------+---------+-----------+---------------+------------------+
| TableReader_7 | 1.00 | root | | data:Selection_6 |
| └─Selection_6 | 1.00 | cop[tikv] | | eq(test.t1.a, 0) |
| └─TableFullScan_5 | 4.00 | cop[tikv] | table:t1 | keep order:false |
+-------------------------+---------+-----------+---------------+------------------+
```
tikv
```
mysql> explain SELECT a FROM t1 WHERE a=0;
+-------------------------+---------+-----------+---------------+------------------+
| id | estRows | task | access object | operator info |
+-------------------------+---------+-----------+---------------+------------------+
| TableReader_7 | 0.00 | root | | data:Selection_6 |
| └─Selection_6 | 0.00 | cop[tikv] | | eq(test.t1.a, 0) |
| └─TableFullScan_5 | 4.00 | cop[tikv] | table:t1 | keep order:false |
+-------------------------+---------+-----------+---------------+------------------+
```
### 4. What is your TiDB version? (Required)
Contributor guide
Assessment
This issue has not been assessed yet.