On 10/29/13 3:25 PM, Raul A. Jager W. wrote:
It is usual to put a "balance" in master files, even if in a
normalized database must be calculated as the sun of the
transactions. This because cost of sum, but in 7.1 you can create an
EVI over the transaction table, and get the sum very fast, so no need
to "de-normalize" to gain performance.
Specifically, *if* the Encoded Vector Index is created with the appropriate "EVI INCLUDE aggregates" that match the aggregates that will be requested in such a query.
_i Index grouping implementation i_
"There are two primary ways to implement grouping using an index: Ordered grouping and pre-summarized processing.
_EVI INCLUDE aggregates_
A more powerful example of pre-summarized processing can be facilitated by the use of the INCLUDE keyword on the index create. By default, COUNT(*) is implied on the creation of an EVI. Additional numeric aggregates specified over non-key data can further facilitate pre-determined or ready-made aggregate results during query optimization.
For example, suppose the following query is a frequently requested result set, queried in whole or as part of a subquery comparison.
GROUP BY col1
Create the following EVI to predetermine the value of AVG(col2).
CREATE ENCODED VECTOR INDEX eviT1 ON t1(col1) INCLUDE(AVG(col2))
This mailing list archive is Copyright 1997-2015 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact