Skip to content

continue opt issue-16375 - #17161

Merged
mergify[bot] merged 4 commits into
matrixorigin:mainfrom
jensenojs:opt-16375
Jun 26, 2024
Merged

mergify[bot] merged 4 commits into
matrixorigin:mainfrom
jensenojs:opt-16375

Conversation

@jensenojs

@jensenojs jensenojs commented Jun 26, 2024 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue ##16375

What this PR does / why we need it:

继续优化insert into select的内存开销

@matrix-meow matrix-meow added the size/S Denotes a PR that changes [10,99] lines label Jun 26, 2024

@jensenojs jensenojs left a comment •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

测试的方式如下所示 :

create table t0 (a int, b int, c int, primary key (a, b));
create table t1 like t0;
create table t2 like t0;
insert into t1 select result, result, result from generate_series(1,500000000) g;

在本pr上insert into t0 select * from t1;
耗时 : 2 min 58.14 sec
image

在main上insert into t0 select * from t1;
耗时 : 4 min 3.82 sec
image

砍掉了去重本身的开销.

@jensenojs

Copy link
Copy Markdown
Contributor Author

此外, 针对这种优化的场景, 更新了一下fuzzy在explain verbose下的行为 :

  1. 会显示Fuzzy决定build在sink scan还是table scan
  2. 如果build在Table Scan, 会显示fuzzy有没有意识到sink scan的数据能否保证唯一性.

如此方便后续debug

image

@ouyuanning

Copy link
Copy Markdown
Contributor

可以建个优先级低一点的issue,看把这部分逻辑抽出来,作为优化规则放在build plan的后面吧

@jensenojs jensenojs closed this Jun 26, 2024
@jensenojs jensenojs reopened this Jun 26, 2024
@jensenojs

Copy link
Copy Markdown
Contributor Author

可以建个优先级低一点的issue,看把这部分逻辑抽出来,作为优化规则放在build plan的后面吧

我接着用下面这个issue跟踪好了

@mergify
mergify Bot merged commit 10f084d into matrixorigin:main Jun 26, 2024
@jensenojs
jensenojs deleted the opt-16375 branch June 27, 2024 02:26
jensenojs added a commit to jensenojs/matrixone that referenced this pull request Jun 28, 2024
继续优化insert into select的内存开销

Approved by: @ouyuanning
fengttt pushed a commit to fengttt/matrixone that referenced this pull request May 7, 2026
继续优化insert into select的内存开销

Approved by: @ouyuanning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement size/S Denotes a PR that changes [10,99] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants