Skip to content

Commit

Permalink
[test](mv) Insert into more data when first insert into to make sure …
Browse files Browse the repository at this point in the history
…using sync mv (apache#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.
  • Loading branch information
seawinde authored Nov 1, 2024
1 parent 309037a commit 55fde45
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 384 deletions.
Loading

0 comments on commit 55fde45

Please sign in to comment.