[
https://issues.apache.org/jira/browse/KYLIN-6005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17928272#comment-17928272
]
Guoliang Sun commented on KYLIN-6005:
-------------------------------------
h3. Design
Add two strategies when matching models: AGG_THEN_INTERNAL_TABLE and
AGG_THEN_SNAPSHOT.
When OlapContext matches an index:
* If the OlapContext originates from a single-table detailed query, the
strategy will match either INTERNAL_TABLE or SNAPSHOT, depending on whether the
internal table switch is enabled.
* If the OlapContext originates from a single-table non-detailed query, the
strategy will first be set to AGG_THEN_INTERNAL_TABLE or AGG_THEN_SNAPSHOT.
This will prioritize matching the model and index (the cost is the time spent
on matching, but the benefit is that the amount of data read from matching
aggregate indexes will be reduced).
** When an index is matched, proceed to the subsequent index query process.
** When no index is matched, it will fall back to either the INTERNAL_TABLE or
SNAPSHOT strategy, depending on whether the internal table switch is enabled.
> For a single-table model, when an internal table exists, aggregate queries do
> not hit the model but instead hit the internal table.
> -----------------------------------------------------------------------------------------------------------------------------------
>
> Key: KYLIN-6005
> URL: https://issues.apache.org/jira/browse/KYLIN-6005
> Project: Kylin
> Issue Type: Bug
> Affects Versions: 5.0.0
> Reporter: Guoliang Sun
> Priority: Major
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)