pingcap / pingcap/tidb

dynamic partition pruning info doesn't appear in some cases

Open
#41,694 0 comments 0 reactions 0 assignees View on GitHub
sig/planner type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement

```
use test;
create table t (a int, b int) partition by range (a) (partition p0 values less than (100), partition p1 values less than (200), partition p2 values less than (300), partition p3 values less than maxvalue);
analyze table t;
explain select * from t where a > 150;
select connection_id();
select * from t where a > 150;
explain for connection 4808316080869081497;
```
When executing `explain select * from t where a > 150`, dynamic partition pruning info `partition:p1,p2,p3` appears in `access object`.
Screen Shot 2023-02-23 at 3 51 04 PM
However, when executing `explain for connection 4808316080869081497`, dynamic partition pruning info doesn't appear.
Screen Shot 2023-02-23 at 4 19 40 PM
On dashboard, when using visual plan, we can see dynamic partition pruning info in `Access Object`.
Screen Shot 2023-02-23 at 4 21 49 PM
However, when using text plan, we cannot see dynamic partition pruning info.
Screen Shot 2023-02-23 at 4 23 32 PM

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.