Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Nov 1, 2024

PR Body: ## Proposed changes

Root Cause Analysis:
Currently, the statistics reported by BE (Backend) nodes have higher priority than those from ANALYZE statements. During the first INSERT INTO operation, the system waits for row count reports from all tablets before updating the table statistics.
Subsequent INSERT INTO operations cannot obtain the status of all tablets, so the system continues to use the statistical information from the first INSERT INTO operation. This leads to a lower estimated cost for the original table's query plan, resulting in the selection of the original table's query plan instead of the materialized view.

Conclusion:
The test case should be modified to include a larger dataset in the first INSERT INTO operation, which will increase the likelihood of utilizing the materialized view. This is because the cost estimation will better reflect the actual data distribution and size, leading to more accurate plan selection.

Cherry-picked from #43010

…using sync mv (#43010)

Root Cause Analysis:
Currently, the statistics reported by BE (Backend) nodes have higher
priority than those from ANALYZE statements. During the first INSERT
INTO operation, the system waits for row count reports from all tablets
before updating the table statistics.
Subsequent INSERT INTO operations cannot obtain the status of all
tablets, so the system continues to use the statistical information from
the first INSERT INTO operation. This leads to a lower estimated cost
for the original table's query plan, resulting in the selection of the
original table's query plan instead of the materialized view.

Conclusion:
The test case should be modified to include a larger dataset in the
first INSERT INTO operation, which will increase the likelihood of
utilizing the materialized view. This is because the cost estimation
will better reflect the actual data distribution and size, leading to
more accurate plan selection.
@github-actions
Copy link
Contributor Author

github-actions bot commented Nov 1, 2024

run buildall

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@dataroaring dataroaring closed this Nov 7, 2024
@dataroaring dataroaring reopened this Nov 7, 2024
@dataroaring
Copy link
Contributor

run buildall

@dataroaring dataroaring merged commit 804c129 into branch-3.0 Nov 14, 2024
@dataroaring dataroaring deleted the auto-pick-43010-branch-3.0 branch December 27, 2024 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants