6 / 7. How to tune your queries and aggregates? The data in a Data
Warehouse is largely very detailed. In SAP BW, the Info Cube is the primary unit
of storage for data for reporting purposes. The results obtained by executing a
report or query represent a summarized dataset.
An aggregate is a
materialized, summarized view of the data in an Info Cube. It stores a subset of
Info Cube data in a redundant form. When an appropriate aggregate for a query
exists, summarized data can be read directly from the database during query
execution, instead of having to perform. this summarization during runtime.
Aggregates reduce the volume of data to be read from the database, speed up
query execution time, and reduce the overall load on the database.
A sound
data model in BW should comprise of the following
Dimensional
modeling.
Logical partitioning.
Physical partitioning.
The main
purpose of aggregate is to accelerate the response time of the queries, by
reducing the amount of data that must be read in the database for a navigation
step. Grouping and filtering will enhance the value of an aggregate.
We can
group according to the characteristic or attribute value, according to the nodes
of the hierarchy level, and also filter according to a fixed value.
It is
guaranteed that queries always deliver consistent data when you drilldown. This
means that data provided when querying against an aggregate is always from the
same set of data that is visible within an Info Cube.
Rollup
New data
packets / requests that are loaded into the InfoCube cannot be used at first for
reporting if there are aggregates that are already filled. The new packets must
first be written to the aggregates by a so-called "roll-up". Data that has been
recently loaded into an InfoCube is not visible for reporting, from the InfoCube
or aggregates, until an aggregate roll-up takes place. During this process you
can continue to report using the data that existed prior to the recent data
load. The new data is only displayed by queries that are executed after a
successful roll-up. See the attachment for more details on the technical process
of a roll-up.
The split of a query is rule-based.
Parts of the query on
different aggregation level are split.
Parts with different selections on
characteristic are combined.
Parts on different hierarchy levels or parts
using different hierarchies are split.
After the split, OLAP processor
searches for an optimal aggregate each part. Parts which use the same aggregate
will be combined again (in some cases it is not possible to combine
them)
Maintaining an aggregate: RSDDV.
After selecting a particular
info cube, we could drill down to the options of the aggregate to tune each of
them.
This is the same screen for BI Accelerator
index.
RSDDBIAMON:
This is another important T code where we could
perform. the following actions. Possible actions
Restart host: restarts the
BI accelerator hardware
Restart BIA server: restarts all the BI accelerator
servers and services. This includes the name server and index server
Restart
BIA index server: restarts the index server. (The name servers are not
restarted.) Rebuild BIA indexes: If a check discovers inconsistencies in the
indexes, you can use this action to delete and rebuild all the BI accelerator
indexes.
Reorganize BIA landscape: If the BI accelerator server landscape is
unevenly distributed, this action redistributes the loaded indexes on the BI
accelerator servers
Checks
Connection Check
Index
Check
In our system BIA monitor is not set up. So, we need
to set up this. Here am not going to set up this, because it might affect few
other RFC destinations.
Query design: Multi-dimensional Query.
Inclusion
/ Exclusion.
Multi provider query.
Cell calculation
Customer
exits.
Query read mode.
Every Query should start with a relatively small
result set; let the user drill down to more detailed information.
Do not use
ODS objects for multi-dimensional reporting.
Queries on Multi Providers
usually access all underlying Info Providers, even if some cannot be hit as no
key figures within the query definition are contained in this Info
Provider.
In ORACLE, fact tables can be indexed either by bitmap indices or
by B-tree indices. A bitmap index stores a bitmap stream for every
characteristic value. Bitmap indices are suitable for characteristics with few
values. Binary operations (AND or OR) are very fast.
B-tree indices are
stored in a (balanced) tree structured. If the system searches one entry, it
starts at the root and follows a path down to the leaf where the row ID is
linked. B-tree indices suit for characteristics with lots of values.
In some
cases, ORACLE indices can degenerate. Degeneration is similar to fragmentation,
and reduces the performance efficiency of the indexes. This happens when records
are frequently added and deleted.
The OLAP Cache can help with most query
performance issues. For frequently used queries, the first access fills the OLAP
Cache and all subsequent calls will hit the OLAP Cache and do not have to read
the database tables. In addition to this pure caching functionality, the Cache
can also be used to optimize specific queries and drill-down paths by 'warming
up' the Cache; with this you fill the Cache in batch to improve
all
accesses to this query data substantially.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/768773/viewspace-627550/
,如需转载,请注明出处,否则将追究法律责任。