Routing and Compensation with Analytical Views

With analytical views enabled, Arcadia Engine evaluates each incoming query against existing analytical views in order to improve performance.

Consider the following situations for matching queries to existing analytical views. For the purpose of this discussion, we care considering queries and subqueries that access a single table. We discuss joins and unions separately.

Exact match, superset, subset, and intersection: analytical views and queries as Venn diagrams
Query Routing Successes
Analytical View is an Exact Match for the Query
If the analytical view is an exact match for the data query (or subquery), Arcadia Engine routes the query to that analytical view.
Analytical View is a Superset of the Query: Compensation Trim

If the analytical view is a superset of the data that the query (or subquery) requires, Arcadia Engine routes the query to that analytical view. It also 'trims' the execution in following cases:

  • Computing expressions

    When the analytical view has columns: (a, b), and the query has: (a + b).

  • Applying predicates

    When the analytical view has a predicate: (a=10), and the query has: (a=10 and b > 13).

  • Re-grouping data

    When the analytical view groups on: (year, month, day), and the query has groups on: (year).

  • Sorting data

    When the analytical view data is not ordered, and the query requires data to be ordered on ‘year’.

  • Limiting data

    When the analytical view does not apply a limit, and the query has a (‘limit 10’) clause.

Analytical View is a Subset of the Query

When an analytical view contains some but not all of the data that the query or subquery requires, Arcadia Engine does not use it. The query is not routed to that analytical view.

Analytical View is an Intersection of the Query

When an analytical view contains some but not all of the data that the query or subquery requires, plus additional information that it does not require, Arcadia Engine does not use it. The query is not routed to that analytical view.