Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partition table didn't support BatchPointGet #21847

Closed
Yisaer opened this issue Dec 17, 2020 · 2 comments
Closed

Partition table didn't support BatchPointGet #21847

Yisaer opened this issue Dec 17, 2020 · 2 comments
Assignees
Labels
sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement. type/performance

Comments

@Yisaer
Copy link
Contributor

Yisaer commented Dec 17, 2020

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table t1 (c int primary key)
PARTITION BY RANGE (c) (
    PARTITION p0 VALUES LESS THAN (6),
    PARTITION p1 VALUES LESS THAN (11),
    PARTITION p2 VALUES LESS THAN (16),
    PARTITION p3 VALUES LESS THAN (21)
);
Query OK, 0 rows affected (0.08 sec)

mysql> explain select * from t1 where c in (1,10);
+-----------------------------+---------+-----------+------------------------+------------------------------------------------------+
| id                          | estRows | task      | access object          | operator info                                        |
+-----------------------------+---------+-----------+------------------------+------------------------------------------------------+
| PartitionUnion_9            | 4.00    | root      |                        |                                                      |
| ├─TableReader_11            | 2.00    | root      |                        | data:TableRangeScan_10                               |
| │ └─TableRangeScan_10       | 2.00    | cop[tikv] | table:t1, partition:p0 | range:[1,1], [10,10], keep order:false, stats:pseudo |
| └─TableReader_13            | 2.00    | root      |                        | data:TableRangeScan_12                               |
|   └─TableRangeScan_12       | 2.00    | cop[tikv] | table:t1, partition:p1 | range:[1,1], [10,10], keep order:false, stats:pseudo |
+-----------------------------+---------+-----------+------------------------+------------------------------------------------------+
5 rows in set (0.00 sec)

2. What did you expect to see? (Required)

Should use BatchPointGet

3. What did you see instead (Required)

Use TableReaderExecutor instead

4. What is your TiDB version? (Required)

mysql> SELECT tidb_version()
    -> ;
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                                                                                                                       |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v4.0.0-beta.2-1836-g3942c411f-dirty
Edition: Community
Git Commit Hash: 3942c411f3e25b61ffe5eb0d93864f11c7f9f495
Git Branch: forbid_pointget_cross_dc
UTC Build Time: 2020-12-17 04:16:42
GoVersion: go1.15rc1
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
@Yisaer Yisaer added the type/bug The issue is confirmed as a bug. label Dec 17, 2020
@xiaodong-ji
Copy link
Contributor

/assign

@qw4990
Copy link
Contributor

qw4990 commented Jun 7, 2021

Close since it has been solved by #24856.

@qw4990 qw4990 closed this as completed Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement. type/performance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants