Closed yangdsh closed 4 years ago
This PR lacks the fixture file. I do not know which metrics to include in the fixture files. We might want to only use dbahist* views, because other views are all duplicated. There are too many metrics now, which makes the processing especially metric pruning slow.
When using dbahist* to calculate db time, the raw db time from the dba_hist_sys_time_model is exactly the same as that in the awr. However, when we sum up the wait time, the result is still a little larger (5-10%) than the db time in the awr.
The main problem I see with only including metrics from the dbahist* views is that we won't be able to upload our past results from SocGen to newer versions of the webserver.
There are some differences between the dba_hist view and the system_event view. For example, there is no average_wait_time in dba_hist view, so I use wait_time/total_waits to calculate the default average wait time. Also, the wait_class_ids of the dba_hist_view are all very large int numbers, so I need to use wait_class name instead.