Open zz-jason opened 5 years ago
Confirming this is still an issue (actually I would say it's even more of an issue, since they should both say TableFullScan imho):
drop table if exists t1, t2;
create table t1 (a bigint primary key, b bigint);
create table t2 (a bigint unsigned primary key, b bigint);
explain select * from t1;
explain select * from t2;
..
mysql> explain select * from t1;
+-----------------------+----------+-----------+---------------+--------------------------------+
| id | estRows | task | access object | operator info |
+-----------------------+----------+-----------+---------------+--------------------------------+
| TableReader_5 | 10000.00 | root | | data:TableFullScan_4 |
| └─TableFullScan_4 | 10000.00 | cop[tikv] | table:t1 | keep order:false, stats:pseudo |
+-----------------------+----------+-----------+---------------+--------------------------------+
2 rows in set (0.00 sec)
mysql> explain select * from t2;
+------------------------+----------+-----------+---------------+------------------------------------------------+
| id | estRows | task | access object | operator info |
+------------------------+----------+-----------+---------------+------------------------------------------------+
| TableReader_5 | 10000.00 | root | | data:TableRangeScan_4 |
| └─TableRangeScan_4 | 10000.00 | cop[tikv] | table:t2 | range:[0,+inf], keep order:false, stats:pseudo |
+------------------------+----------+-----------+---------------+------------------------------------------------+
2 rows in set (0.00 sec)
Feature Request
Is your feature request related to a problem? Please describe:
We use different range representations for full range scans in different contexts. For example,
range:[-inf,+inf]
is used to represent a full range scan on a signed int column:While for an unsigned column, the full range representation is
range:[0,+inf]
:Describe the feature you'd like:
Uniform the way to represent a full range scan, make things clear, less confusion, less thinking.
For example, we can directly display like
range:full
to represent the full range scan operation.Describe alternatives you've considered:
No
Teachability, Documentation, Adoption, Migration Strategy:
No