This describes the wi_sharedresourceusage table and how each column of data arises from the share_resource_usage table.
The data of this table come from raw tableshare_resource_usage. The sum value for the resource is first aggregated for the same interval under the group by of "TimeDiff", "ResourceName" and "ClusterName". Then the records are again aggregated for the hour for the grouping of "Clustername", "ResourceName" and "TimeDiff" and the value are summed, find the minimum, the maximum and the number of records aggregated counted.
This is the column description of each data column of WI_SHAREDRESOURCEUSAGE and how each column is filled with data.
Columns |
Description |
Key |
CLUSTER_CODE |
This comes from the "ClusterName" field in share_resource_usage table. Once we get the cluster_name, we then look it up in the wi_clustercode table to see if we have already has a record of it in there. If we do, then we'll get the code back, otherwise, we will insert it into the wi_clustercode table and generate the code. The code itself is a positive integer and each new code is equal to the maximum of the existing code+1. |
Primary key |
TIME_STAMP |
This is in GMT and is always end in the hour such as 02:00:00. This marks the time that this record is aggregated. For example, 02:00:00 means that all the records between 02:00:00 and 02:59:00 are aggregated into this record. |
Primary key |
RESOURCE_CODE |
This comes from the "ResourceName" field in the share_resource_usage table. Once we get the resource name, we then look it up in the wi_resourcecode table to see if we have already has a record of it in there. If we do, then we'll get the code back, otherwise, we will insert it into the wi_resourcecode table and generate the code. The code itself is a positive integer and each new code is equal to the maximum of the existing code+1. |
Primary key |
LOCAL_SERVERTIME |
This comes from the "Time_stamp" in this table. This is transformed into local server time. |
|
MIN_VALUE |
This is the minimum of all the values for this resource across the hour. |
|
MAX_VALUE |
This is the maximum of all the values for this resource across the hour. |
|
SAMPLING_COUNTER |
This is the number of sampled records being aggregated into this record. |
|
SUM_VALUE |
This is the sum of all the values for this resource across the hour. |
|
INSERT_SEQ |
This is a system generated sequence number. For each new record inserted, a unique sequence number is being assigned to this column. |
|