We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please answer these questions before submitting your issue. Thanks!
create table t(a int); insert into t values (1); create view v as select * from t; explain with cte as (select /+merge()/ * from v) select * from cte;
merge in cte works
mysql> explain with cte as (select * from v) select * from cte; +--------------------------------+---------+-----------+---------------+--------------------------------+ | id | estRows | task | access object | operator info | +--------------------------------+---------+-----------+---------------+--------------------------------+ | CTEFullScan_11 | 1.00 | root | CTE:cte | data:CTE_0 | | CTE_0 | 1.00 | root | | Non-Recursive CTE | | └─TableReader_9(Seed Part) | 1.00 | root | | data:TableFullScan_8 | | └─TableFullScan_8 | 1.00 | cop[tikv] | table:t | keep order:false, stats:pseudo | +--------------------------------+---------+-----------+---------------+--------------------------------+ 4 rows in set (0.00 sec) mysql> explain with cte as (select /*+merge()*/ * from v) select * from cte; +--------------------------------+---------+-----------+---------------+--------------------------------+ | id | estRows | task | access object | operator info | +--------------------------------+---------+-----------+---------------+--------------------------------+ | CTEFullScan_11 | 1.00 | root | CTE:cte | data:CTE_0 | | CTE_0 | 1.00 | root | | Non-Recursive CTE | | └─TableReader_9(Seed Part) | 1.00 | root | | data:TableFullScan_8 | | └─TableFullScan_8 | 1.00 | cop[tikv] | table:t | keep order:false, stats:pseudo | +--------------------------------+---------+-----------+---------------+--------------------------------+ 4 rows in set (0.00 sec)
| Release Version: v6.2.0 Edition: Community Git Commit Hash: 65f7e2e Git Branch: heads/refs/tags/v6.2.0 UTC Build Time: 2022-07-27 10:10:50 GoVersion: go1.18.2
The text was updated successfully, but these errors were encountered:
Merge
planner: fix Merge hint for view (#36678)
1f6f7da
close #36666
planner: fix Merge hint for view (#36678) (#36760)
c5718d7
Do we have any document about the hint merge()?
merge()
Sorry, something went wrong.
doc-cn is merged, and doc will be available soon.
dayicklp
Successfully merging a pull request may close this issue.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
create table t(a int);
insert into t values (1);
create view v as select * from t;
explain with cte as (select /+merge()/ * from v) select * from cte;
2. What did you expect to see? (Required)
merge in cte works
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
| Release Version: v6.2.0
Edition: Community
Git Commit Hash: 65f7e2e
Git Branch: heads/refs/tags/v6.2.0
UTC Build Time: 2022-07-27 10:10:50
GoVersion: go1.18.2
The text was updated successfully, but these errors were encountered: