EmmyMiao87 opened a new pull request #2821: The new materialized view selector
URL: https://github.com/apache/incubator-doris/pull/2821
 
 
   This commit mainly implements the new materialized view selector which 
supports SPJ<->SPJG.
   Two parameters are currently used to regulate this function.
   1. test_materialized_view: When this parameter is set to true, the user can 
create a materialized view for the duplicate table by using 'CREATE 
MATERIALIZED VIEW' command.
   At the same time, if the result of the new materialized views is different 
from the old version during the query, an error will be reported. This 
parameter is false by default, which means that the new version of the 
materialized view function cannot be enabled.
   2. use_old_mv_selector: When this parameter is set to true, the result of 
the old version selector will be selected. If set to false, the result of the 
new version selector will be selected. This parameter is true by default, which 
means that the old selector is used.
   If the default values of the above two parameters do not change, there will 
be no behavior changes in the current version.
   
   The main steps for the new selector are as follows:
   1. Predicates stage: This stage will mainly filter out all materialized 
views that do not meet the current query requirements.
   2. Priorities stage: This stage will sort the results of the first stage and 
choose the best materialized view.
   
   The predicates phase is divided into 6 steps:
   1. Calculate the predicate gap between the current query and view.
   2. Whether the columns in the view can meet the needs of the compensating 
predicates.
   3. Determine whether the group by columns of view match the group by columns 
of query.
   4. Determine whether the aggregate columns of view match the aggregate 
columns of query.
   5. Determine whether the output columns of view match the output columsn of 
query.
   6. Add partial materialized views
   
   The priorities phase is divided into two steps:
   1. Find the materialized view that matches the best prefix index
   2. Find the materialized view with the least amount of data
   
   The biggest difference between the current materialized view selector and 
the previous one is that it supports SPJ <-> SPJG.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to