semi/anti-semi join too slow when join key has so many duplicated rows
Open
sig/execution
type/enhancement
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
semi/anti-semi join too slow when join key has so many duplicated rows
steps:
1.create table t2(a int AUTO_INCREMENT PRIMARY KEY,b int);
2. insert into t2(b) values(1);
3. /* do step-2 x times */
4. explain analyze select * from t2 where not exists (select NULL from t2 hehe where hehe.b=t2.b );
5. you will see `c.matchJoinKey` execute x^2 times in `for` loops in `(c *hashRowContainer) GetMatchedRowsAndPtrs`
related OnCall: https://internal.pingcap.net/jira/browse/ONCALL-4749
Contributor guide
Assessment
This issue has not been assessed yet.