seawinde opened a new pull request, #43010:
URL: https://github.com/apache/doris/pull/43010

   ## 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.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to