Rem drv:
Rem
Rem $Header: chronos_views.sql 12-dec-2005.11:34:59 yxie Exp $
Rem
Rem chronos_views.sql
Rem
Rem Copyright (c) 2002, 2005, Oracle. All rights reserved.
Rem
Rem NAME
Rem chronos_views.sql -
Rem
Rem DESCRIPTION
Rem
Rem
Rem NOTES
Rem
Rem
Rem MODIFIED (MM/DD/YY)
Rem yxie 12/12/05 - Backport yxie_bug-4725344 from main
Rem yxie 11/22/05 - remove rollup time filtering
Rem gsbhatia 07/01/05 - New repmgr header impl
Rem gsbhatia 06/26/05 - New repmgr header impl
Rem yxie 06/06/05 - changes depends_on to supports_eum_on
Rem yxie 04/15/05 - changing contains to depends_on
Rem eporter 03/14/05 - Add views for bootstrapping new tables
Rem gsbhatia 02/13/05 - updating repmgr header
Rem gsbhatia 02/09/05 - updating repmgr header
Rem gsbhatia 02/07/05 - updating repmgr header
Rem ramalhot 01/17/05 - assoc def name changed from member to contains
Rem ktlaw 01/11/05 - add repmgr header
Rem eporter 12/13/04 - Remove references to mgmt_rt_region_members
Rem eporter 12/02/04 - Bug 3849061 - Change region implementation
Rem ramalhot 08/25/04 - cutover to new assoc tables
Rem jhsy 08/13/04 - add database time
Rem snakai 09/26/03 - fix region queries
Rem sgrover 03/19/03 - remove load_timstampand variance
Rem rmarripa 06/14/02 - delete views which involves rep url properties
Rem rpinnama 05/14/02 - rpinnama_reorg_rep_scripts
Rem rpinnama 05/14/02 - Created
Rem
rem
rem Chronos View definitions are provided below. The views are the
rem public interface to the above tables.
rem
rem This section provides a high level overview of what is available
rem
rem View Name Description
rem ----------------------- -------------------------------------------------------------------------
rem
rem EM$RT_COOKIE_DATA View on raw cookie data table
rem EM$RT_COOKIES Raw response time data tied together with its associated cookie data
rem EM$RT_CURRENT_URL_AVG_1HOUR Most recent value for the URL in question taken from hourly rollup table
rem EM$RT_CURRENT_URL_AVG_1DAY Most recent value for the URL in question taken from daily rollup table
rem EM$RT_DOMAIN_DETAILS_1DAY Domain details for 1 day time span
rem EM$RT_DOMAIN_DETAILS_31DAY Domain details for 31 day time span
rem EM$RT_DOMAIN_DETAILS_7DAY Domain details for 7 days time span
rem EM$RT_DOMAIN_DIST_1DAY Domain rt distribution for 1 day
rem EM$RT_DOMAIN_DIST_31DAY Domain rt distribution for 31 days
rem EM$RT_DOMAIN_DIST_7DAY Domain rt distribution for 7 days
rem EM$RT_DOMAIN_MOST_HITS_1DAY Domain rt stats for 1 day, ordered by most hits
rem EM$RT_DOMAIN_MOST_HITS_31DAY Domain rt stats for 31 days, ordered by most hits
rem EM$RT_DOMAIN_MOST_HITS_7DAY Domain rt stats for 7 days, ordered by most hits
rem EM$RT_DOMAIN_MOST_UNF_1DAY Domain rt status, ordered by most hits, unfiltered
rem EM$RT_DOMAIN_MOST_UNF_31DAY Domain rt status, ordered by most hits, unfiltered
rem EM$RT_DOMAIN_MOST_UNF_7DAY Domain rt status, ordered by most hits, unfiltered
rem EM$RT_DOMAIN_SLOWEST_1DAY Domain rt stats for 1 day, ordered by response time
rem EM$RT_DOMAIN_SLOWEST_31DAY Domain rt stats for 31 days, ordered by response time
rem EM$RT_DOMAIN_SLOWEST_7DAY Domain rt stats for 7 days, ordered by response time
rem EM$RT_DOMAIN_SLOWEST_UNF_1DAY Domain rt stats for 1 day, ordered by response time, unfiltered
rem EM$RT_DOMAIN_SLOWEST_UNF_31DAY Domain rt stats for 31 days, ordered by response time, unfiltered
rem EM$RT_DOMAIN_SLOWEST_UNF_7DAY Domain rt stats for 7 days, ordered by response time, unfiltered
rem EM$RT_IP_DETAILS_1DAY IP details for 1 day time span
rem EM$RT_IP_DETAILS_31DAY IP details for 31 day time span
rem EM$RT_IP_DETAILS_7DAY IP details for 7 day time span
rem EM$RT_IP_DIST_1DAY IP rt distribution for 1 day
rem EM$RT_IP_DIST_31DAY IP rt distribution for 31 days
rem EM$RT_IP_DIST_7DAY IP rt distribution for 7 days
rem EM$RT_IP_MOST_HITS_1DAY IP rt stats for 1 day, ordered by most hits
rem EM$RT_IP_MOST_HITS_31DAY IP rt stats for 31 days, ordered by most hits
rem EM$RT_IP_MOST_HITS_7DAY IP rt stats for 7 days, ordered by most hits
rem EM$RT_IP_MOST_HITS_UNF_1DAY IP rt stats for 1 day, ordered by most hits, unfiltered
rem EM$RT_IP_MOST_HITS_UNF_31DAY IP rt stats for 31 days, ordered by most hits, unfiltered
rem EM$RT_IP_MOST_HITS_UNF_7DAY IP rt stats for 7 days, ordered by most hits, unfiltered
rem EM$RT_IP_SLOWEST_1DAY IP rt stats for 1 day, ordered by response time
rem EM$RT_IP_SLOWEST_31DAY IP rt stats for 31 days, ordered by response time
rem EM$RT_IP_SLOWEST_7DAY IP rt stats for 7 days, ordered by response time
rem EM$RT_IP_SLOWEST_UNF_1DAY IP rt stats for 1 day, ordered by response time, unfiltered
rem EM$RT_IP_SLOWEST_UNF_31DAY IP rt stats for 31 days, ordered by response time, unfiltered
rem EM$RT_IP_SLOWEST_UNF_7DAY IP rt stats for 7 days, ordered by response time, unfiltered
rem EM$RT_LOOPBACK_DETAILS_1DAY URL Timing metric stats for 1 day
rem EM$RT_LOOPBACK_DETAILS_31DAY URL Timing metric stats for 31 days
rem EM$RT_LOOPBACK_DETAILS_7DAY URL Timing metric stats for 7 days
rem EM$RT_METRICS_DETAILS_1DAY Response Metrics stats for 1 day
rem EM$RT_METRICS_DETAILS_31DAY Response Metrics stats for 31 days
rem EM$RT_METRICS_DETAILS_7DAY Response Metrics stats for 7 days
rem EM$RT_RAW View on raw data table with individual metric samples
rem EM$RT_REGIONS Region definitions (meta data)
rem EM$RT_REGION_DETAILS_1DAY Region details for 1 day time span
rem EM$RT_REGION_DETAILS_31DAY Region details for 31 day time span
rem EM$RT_REGION_DETAILS_7DAY Region details for 7 day time span
rem EM$RT_REGION_DIST_1DAY 1 day region rollup distribution
rem EM$RT_REGION_DIST_1HOUR 1 hour region rollup distribution
rem EM$RT_REGION_MOST_HITS_1DAY Region rt stats for 1 day, ordered by most hits
rem EM$RT_REGION_MOST_HITS_31DAY Region rt stats for 31 days, ordered by most hits
rem EM$RT_REGION_MOST_HITS_7DAY Region rt stats for 7 days, ordered by most hits
rem EM$RT_REGION_MOST_UNF_1DAY Region rt stats for 1 day, ordered by most hits, unfiltered
rem EM$RT_REGION_MOST_UNF_31DAY Region rt stats for 31 days, ordered by most hits, unfiltered
rem EM$RT_REGION_MOST_UNF_7DAY Region rt stats for 7 days, ordered by most hits, unfiltered
rem EM$RT_REGION_RAW_RECENT_HITS Most recent URL hits by region
rem EM$RT_REGION_RAW_SLOWEST_1DAY Region slowest from raw table
rem EM$RT_REGION_RAW_SLOWEST_31DAY Region slowest from raw table
rem EM$RT_REGION_RAW_SLOWEST_7DAY Region slowest from raw table
rem EM$RT_REGION_SLOWEST_1DAY Region rt stats for 1 day, ordered by response time
rem EM$RT_REGION_SLOWEST_31DAY Region rt stats for 31 days, ordered by response time
rem EM$RT_REGION_SLOWEST_7DAY Region rt stats for 7 days, ordered by response time
rem EM$RT_REGION_SLOWEST_UNF_1DAY Region rt stats for 1 day, ordered by response time, unfiltered
rem EM$RT_REGION_SLOWEST_UNF_31DAY Region rt stats for 31 days, ordered by response time, unfiltered
rem EM$RT_REGION_SLOWEST_UNF_7DAY Region rt stats for 7 days, ordered by response time, unfiltered
rem EM$RT_URL_DETAILS_1DAY URL timeseries details for 1 day time span
rem EM$RT_URL_DETAILS_31DAY URL timeseries details for 31 day time span
rem EM$RT_URL_DETAILS_7DAY URL timeseries details for 7 day time span
rem EM$RT_URL_DIST_1DAY URL rt distribution for 1 day
rem EM$RT_URL_DIST_31DAY URL rt distribution for 31 days
rem EM$RT_URL_DIST_7DAY URL rt distribution for 7 days
rem EM$RT_URL_MOST_FAVORITE_1DAY Most favorite URL response time stats for 1 day
rem EM$RT_URL_MOST_FAVORITE_31DAY Most favorite URL response time stats for 31 days
rem EM$RT_URL_MOST_FAVORITE_7DAY Most favorite URL response time stats for 7 days
rem EM$RT_URL_MOST_HITS_1DAY URL rt stats for 1 day, ordered by most hits
rem EM$RT_URL_MOST_HITS_31DAY URL rt stats for 31 days, ordered by most hits
rem EM$RT_URL_MOST_HITS_7DAY URL rt stats for 7 days, ordered by most hits
rem EM$RT_URL_MOST_HITS_UNF_1DAY URL rt stats for 1 day, ordered by most hits
rem EM$RT_URL_MOST_HITS_UNF_31DAY URL rt stats for 31 days, ordered by most hits
rem EM$RT_URL_MOST_HITS_UNF_7DAY URL rt stats for 7 days, ordered by most hits
rem EM$RT_URL_RAW_RECENT_HITS Most recent URL hits
rem EM$RT_URL_RAW_SLOWEST_1DAY URL hits for 1 day, ordered by slowest
rem EM$RT_URL_RAW_SLOWEST_31DAY URL hits for 31 days, ordered by slowest
rem EM$RT_URL_RAW_SLOWEST_7DAY URL hits for 7 days, ordered by slowest
rem EM$RT_URL_SLOWEST_1DAY URL rt slowest for 1 day, ordered by response time
rem EM$RT_URL_SLOWEST_31DAY URL rt slowest for 31 days, ordered by response time
rem EM$RT_URL_SLOWEST_7DAY URL rt slowest for 7 days, ordered by response time
rem EM$RT_URL_SLOWEST_UNF_1DAY URL rt slowest for 1 day, ordered by response time, unfiltered
rem EM$RT_URL_SLOWEST_UNF_31DAY URL rt slowest for 31 days, ordered by response time, unfiltered
rem EM$RT_URL_SLOWEST_UNF_7DAY URL rt slowest for 7 days, ordered by response time, unfiltered
rem EM$RT_WATCH_LIST_1DAY Watch list rt stats for 1 day, ordered by preference, response time
rem EM$RT_WATCH_LIST_31DAY Watch list rt stats for 31 days, ordered by preference, response time
rem EM$RT_WATCH_LIST_7DAY Watch list rt stats for 7 days, ordered by preference, response time
rem EM$RT_INCOMPLETE_LOADS Incomplete Loads hourly rollup data with bootstrap data.
rem EM$RT_PR_MAPPING Page Request Mapping hourly rollup data with bootstrap data.
rem
rem PURPOSE
rem
rem The EM$RT_RAW view provides a public interface to the url
rem access response time metrics collected for given targets.
rem
rem COLUMNS
rem
rem The same as MGMT_RT_METRICS_RAW, except for the following addition:
rem - url_link, which is the concatanation of url_base and url_filename
rem
rem NOTES
rem
rem
CREATE OR REPLACE VIEW em$rt_raw
(
target_guid, metric_name, collection_timestamp,
status, status_description, submit_action_timestamp, load_action_timestamp,
elapsed_time,
url_base, url_link, url_filename,
visitor_node, visitor_domain, visitor_ip, visitor_ip_num,
server_in_timestamp, server_out_timestamp, server_latency_time, database_time,
browser_name, browser_version, os_name, os_version,
username, cookie_index, cache_rendered
)
AS
SELECT target_guid, metric_name, collection_timestamp,
status, status_description, submit_action_timestamp, load_action_timestamp,
elapsed_time,
url_base, url_base || url_filename, url_filename,
visitor_node, visitor_domain, visitor_ip, visitor_ip_num,
server_in_timestamp, server_out_timestamp, server_latency_time, database_time,
browser_name, browser_version, os_name, os_version,
username, cookie_index, cache_rendered
FROM MGMT_RT_METRICS_RAW;
rem
rem PURPOSE
rem
rem This view selects a set of regions.
rem Each region consits of a set of domain name substring patterns.
rem Regions are not hierarchical.
rem
rem COLUMNS
rem The columns are the same as in MGMT_RT_REGIONS
rem and MGMT_RT_REGION_MEMBERS.
rem The MGMT_RT_REGION_MEMBERS table has been removed, but the data is
rem still in the same format. If the region is defined by domain, the
rem member_type will be 'D' and if by subnet the member_type will be 'S'.
rem
rem NOTES
rem
rem
CREATE OR REPLACE VIEW EM$RT_REGIONS
(
target_guid,
region_name,
description,
region_member,
member_type
)
AS
SELECT r.target_guid,
r.region_name, r.description,
e.domain, DECODE(e.min_ip, -1, 'D', 'S')
FROM MGMT_RT_REGIONS r, MGMT_RT_REGION_MAPPING m, MGMT_RT_REGION_ENTRIES e
WHERE m.region_guid = r.region_guid
AND m.id = e.id;
rem
rem VIEW em$rt_cookie_data
rem
rem PURPOSE
rem View on raw cookie data tables.
rem
rem COLUMNS
rem The same as MGMT_RT_COOKIE_DATA.
rem
rem NOTES
rem
CREATE OR REPLACE VIEW em$rt_cookie_data
(raw_index,name,value)
AS
SELECT raw_index,name,value
FROM
MGMT_RT_COOKIE_DATA;
rem
rem VIEW EM$RT_CURRENT_URL_AVG_1DAY
rem
rem PURPOSE
rem Most recently daily average value by URL
rem
rem COLUMNS
rem see MGMT_RT_URL_1DAY
rem
rem NOTES
rem
rem
CREATE OR REPLACE VIEW EM$RT_CURRENT_URL_AVG_1DAY
(COMPOSITE_TARGET_GUID,
COMPOSITE_TARGET_NAME, COMPOSITE_TARGET_TYPE,
METRIC_NAME, URL_FILENAME, RESPONSE_TIME_CURRENT_AVG)
AS
SELECT COMPOSITE_TARGET_GUID,
COMPOSITE_TARGET_NAME, COMPOSITE_TARGET_TYPE,
METRIC_NAME, URL_FILENAME,
sum(RESPONSE_TIME_AVERAGE*HITS)/sum(HITS) as RESPONSE_TIME_CURRENT_AVG
FROM
(SELECT m.source_target_guid composite_target_guid,
ct.target_name composite_target_name, ct.target_type composite_target_type,
d.metric_name, d.url_filename, d.response_time_average,
d.rollup_timestamp,
max(d.rollup_timestamp) OVER (PARTITION by source_target_guid,
metric_name, url_filename) as ts_max, d.hits
FROM MGMT_RT_URL_1DAY d,
MGMT_TARGET_ASSOCS m,
MGMT_TARGETS ct,
MGMT_TARGET_ASSOC_DEFS def
WHERE d.target_guid = m.assoc_target_guid
AND def.assoc_guid = m.assoc_guid
AND def.assoc_def_name = 'supports_eum_on'
AND def.scope_target_type = ' '
AND ct.target_guid = m.source_target_guid
) WHERE rollup_timestamp = ts_max
group by COMPOSITE_TARGET_GUID,
COMPOSITE_TARGET_NAME, COMPOSITE_TARGET_TYPE,
METRIC_NAME, URL_FILENAME ;
rem
rem VIEW EM$RT_CURRENT_URL_AVG_1HOUR
rem
rem PURPOSE
rem Most recently hourly average value by URL
rem
rem COLUMNS
rem see MGMT_RT_URL_1HOUR
rem
rem NOTES
rem
rem
CREATE OR REPLACE VIEW EM$RT_CURRENT_URL_AVG_1HOUR
(COMPOSITE_TARGET_GUID,
COMPOSITE_TARGET_NAME, COMPOSITE_TARGET_TYPE,
METRIC_NAME, URL_FILENAME, RESPONSE_TIME_CURRENT_AVG)
AS
SELECT COMPOSITE_TARGET_GUID,
COMPOSITE_TARGET_NAME, COMPOSITE_TARGET_TYPE,
METRIC_NAME, URL_FILENAME,
sum(RESPONSE_TIME_AVERAGE*HITS)/sum(HITS) as RESPONSE_TIME_CURRENT_AVG
FROM
(SELECT m.source_target_guid composite_target_guid,
ct.target_name composite_target_name, ct.target_type composite_target_type,
d.metric_name, d.url_filename, d.response_time_average,
d.rollup_timestamp, max(d.rollup_timestamp)
OVER (PARTITION by m.source_target_guid,
metric_name, url_filename) as ts_max, d.hits
FROM MGMT_RT_URL_1HOUR d,
MGMT_TARGET_ASSOCS m,
MGMT_TARGETS ct,
MGMT_TARGET_ASSOC_DEFS def
WHERE d.target_guid = m.assoc_target_guid
AND def.assoc_guid = m.assoc_guid
AND def.assoc_def_name = 'supports_eum_on'
AND def.scope_target_type = ' '
AND ct.target_guid = m.source_target_guid
) WHERE rollup_timestamp = ts_max
group by COMPOSITE_TARGET_GUID,
COMPOSITE_TARGET_NAME, COMPOSITE_TARGET_TYPE,
METRIC_NAME, URL_FILENAME ;
rem
rem VIEW em$url_rt_details_
rem
rem PURPOSE
rem Selects response time details for the time span specified.
rem This view is used to populate timeseries displays.
rem The 1 and 7 day time span selects from the hourly rollup table.
rem The 31 day time spans select from the daily rollup table.
rem
rem COLUMNS
rem see MGMT_RT_URL_1HOUR
rem
rem NOTES
rem
rem
CREATE OR REPLACE VIEW em$rt_url_details_1day
(COMPOSITE_TARGET_GUID,
COMPOSITE_TARGET_NAME, COMPOSITE_TARGET_TYPE,
TARGET_GUID,
METRIC_NAME, DISPLAY_NAME, URL_FILENAME, URL_LINK,
ROLLUP_TIMESTAMP, RESPONSE_TIME_AVERAGE, RESPONSE_TIME_MINIMUM,
RESPONSE_TIME_MAXIMUM, RESPONSE_TIME_STDDEV, HITS)
AS
SELECT
m.SOURCE_TARGET_GUID,
ct.TARGET_NAME, ct.TARGET_TYPE,
m.ASSOC_TARGET_GUID,
d.METRIC_NAME,
nvl((SELECT display_name FROM MGMT_RT_URLS u
WHERE u.target_guid = m.source_target_guid
AND u.url_filename = d.url_filename), d.url_filename) "DISPLAY_NAME",
d.URL_FILENAME,
d.URL_LINK,
d.ROLLUP_TIMESTAMP, d.response_time_average,
d.RESPONSE_TIME_MINIMUM, d.RESPONSE_TIME_MAXIMUM,
d.RESPONSE_TIME_SDEV, d.HITS
FROM
MGMT_RT_URL_1HOUR d, MGMT_TARGET_ASSOCS m,
MGMT_TARGETS ct,
MGMT_TARGET_ASSOC_DEFS def
WHERE
d.target_guid = m.assoc_target_guid
AND def.assoc_guid = m.assoc_guid
AND def.assoc_def_name = 'supports_eum_on'
AND def.scope_target_type = ' '
AND ct.target_guid = m.source_target_guid;
CREATE OR REPLACE VIEW em$rt_url_details_7day
(COMPOSITE_TARGET_GUID, COMPOSITE_TARGET_NAME, COMPOSITE_TARGET_TYPE,
TARGET_GUID,
METRIC_NAME, DISPLAY_NAME, URL_FILENAME, URL_LINK,
ROLLUP_TIMESTAMP, RESPONSE_TIME_AVERAGE, RESPONSE_TIME_MINIMUM,
RESPONSE_TIME_MAXIMUM, RESPONSE_TIME_STDDEV, HITS)
AS
SELECT
m.SOURCE_TARGET_GUID,
ct.TARGET_NAME, ct.TARGET_TYPE,
m.ASSOC_TARGET_GUID,
d.METRIC_NAME,
nvl((SELECT display_name FROM MGMT_RT_URLS u
WHERE u.target_guid = m.source_target_guid
AND u.url_filename = d.url_filename), d.url_filename) "DISPLAY_NAME",
d.URL_FILENAME,
d.URL_LINK,
d.ROLLUP_TIMESTAMP, d.response_time_average,
d.RESPONSE_TIME_MINIMUM, d.RESPONSE_TIME_MAXIMUM,
d.RESPONSE_TIME_SDEV, d.HITS
FROM
MGMT_RT_URL_1HOUR d, MGMT_TARGET_ASSOCS m,
MGMT_TARGETS ct, MGMT_TARGET_ASSOC_DEFS def
WHERE
d.target_guid = m.assoc_target_guid
AND def.assoc_guid = m.assoc_guid
AND def.assoc_def_name = 'supports_eum_on'
AND def.scope_target_type = ' '
AND ct.target_guid = m.source_target_guid;
CREATE OR REPLACE VIEW em$rt_url_details_31day
(COMPOSITE_TARGET_GUID,
COMPOSITE_TARGET_NAME, COMPOSITE_TARGET_TYPE,
TARGET_GUID,
METRIC_NAME, DISPLAY_NAME, URL_FILENAME, URL_LINK,
ROLLUP_TIMESTAMP, RESPONSE_TIME_AVERAGE, RESPONSE_TIME_MINIMUM,
RESPONSE_TIME_MAXIMUM, RESPONSE_TIME_STDDEV, HITS)
AS
SELECT
m.source_TARGET_GUID,
ct.TARGET_NAME, ct.TARGET_TYPE,
m.assoc_TARGET_GUID,
d.METRIC_NAME,
nvl((SELECT display_name FROM MGMT_RT_URLS u
WHERE u.target_guid = m.source_target_guid
AND u.url_filename = d.url_filename), d.url_filename) "DISPLAY_NAME",
d.URL_FILENAME,
d.URL_LINK,
d.ROLLUP_TIMESTAMP, d.response_time_average,
d.RESPONSE_TIME_MINIMUM, d.RESPONSE_TIME_MAXIMUM,
d.RESPONSE_TIME_SDEV, d.HITS
FROM
MGMT_RT_URL_1DAY d, MGMT_TARGET_ASSOCS m,
MGMT_TARGETS ct, MGMT_TARGET_ASSOC_DEFS def
WHERE
d.target_guid = m.assoc_target_guid
AND def.assoc_guid = m.assoc_guid
AND def.assoc_def_name = 'supports_eum_on'
AND def.scope_target_type = ' '
AND ct.target_guid = m.source_target_guid;
rem
rem VIEW em$rt_domain_details_
rem
rem PURPOSE
rem Selects response time details for the time span specified.
rem This view is used to populate timeseries displays.
rem The 1 and 7 day time span selects from the hourly rollup table.
rem The 31 day time spans select from the daily rollup table.
rem
rem COLUMNS
rem see MGMT_RT_DOMAIN_1HOUR
rem
rem NOTES
rem
rem
CREATE OR REPLACE VIEW em$rt_domain_details_1day
( COMPOSITE_TARGET_GUID,
COMPOSITE_TARGET_NAME, COMPOSITE_TARGET_TYPE,
TARGET_GUID,
METRIC_NAME,
VISITOR_DOMAIN, ROLLUP_TIMESTAMP, RESPONSE_TIME_AVERAGE,
RESPONSE_TIME_MINIMUM, RESPONSE_TIME_MAXIMUM, RESPONSE_TIME_STDDEV,
HITS)
AS
SELECT
m.SOURCE_TARGET_GUID,
ct.TARGET_NAME, ct.TARGET_TYPE,
m.ASSOC_TARGET_GUID,
d.METRIC_NAME, d.VISITOR_DOMAIN,
d.ROLLUP_TIMESTAMP, d.RESPONSE_TIME_AVERAGE,
d.RESPONSE_TIME_MINIMUM, d.RESPONSE_TIME_MAXIMUM,
d.RESPONSE_TIME_SDEV, d.HITS
FROM
MGMT_RT_DOMAIN_1HOUR d, MGMT_TARGET_ASSOCS m,
MGMT_TARGETS ct, MGMT_TARGET_ASSOC_DEFS def
WHERE
d.target_guid = m.assoc_target_guid
AND def.assoc_guid = m.assoc_guid
AND def.assoc_def_name = 'supports_eum_on'
AND def.scope_target_type = ' '
AND ct.target_guid = m.source_target_guid;
CREATE OR REPLACE VIEW em$rt_domain_details_7day
(COMPOSITE_TARGET_GUID,
COMPOSITE_TARGET_NAME, COMPOSITE_TARGET_TYPE,
TARGET_GUID,
METRIC_NAME,
VISITOR_DOMAIN, ROLLUP_TIMESTAMP, RESPONSE_TIME_AVERAGE,
RESPONSE_TIME_MINIMUM, RESPONSE_TIME_MAXIMUM, RESPONSE_TIME_STDDEV,
HITS)
AS
SELECT
m.SOURCE_TARGET_GUID,
ct.TARGET_NAME, ct.TARGET_TYPE,
m.ASSOC_TARGET_GUID,
d.METRIC_NAME, d.VISITOR_DOMAIN,
d.ROLLUP_TIMESTAMP, d.RESPONSE_TIME_AVERAGE,
d.RESPONSE_TIME_MINIMUM, d.RESPONSE_TIME_MAXIMUM,
d.RESPONSE_TIME_SDEV, d.HITS
FROM
MGMT_RT_DOMAIN_1HOUR d, MGMT_TARGET_ASSOCS m,
MGMT_TARGETS ct, MGMT_TARGET_ASSOC_DEFS def
WHERE
d.target_guid = m.assoc_target_guid
AND def.assoc_guid = m.assoc_guid
AND def.assoc_def_name = 'supports_eum_on'
AND def.scope_target_type = ' '
AND ct.target_guid = m.source_target_guid;
CREATE OR REPLACE VIEW em$rt_domain_details_31day
(COMPOSITE_TARGET_GUID,
COMPOSITE_TARGET_NAME, COMPOSITE_TARGET_TYPE,
TARGET_GUID,
METRIC_NAME,
VISITOR_DOMAIN, ROLLUP_TIMESTAMP, RESPONSE_TIME_AVERAGE,
RESPONSE_TIME_MINIMUM, RESPONSE_TIME_MAXIMUM, RESPONSE_TIME_STDDEV,
HITS)
AS
SELECT
m.SOURCE_TARGET_GUID,
ct.TARGET_NAME, ct.TARGET_TYPE,
m.ASSOC_TARGET_GUID,
d.METRIC_NAME, d.VISITOR_DOMAIN,
d.ROLLUP_TIMESTAMP, d.RESPONSE_TIME_AVERAGE,
d.RESPONSE_TIME_MINIMUM, d.RESPONSE_TIME_MAXIMUM,
d.RESPONSE_TIME_SDEV, d.HITS
FROM
MGMT_RT_DOMAIN_1DAY d, MGMT_TARGET_ASSOCS m,
MGMT_TARGETS ct, MGMT_TARGET_ASSOC_DEFS def
WHERE
d.target_guid = m.assoc_target_guid
AND def.assoc_guid = m.assoc_guid
AND def.assoc_def_name = 'supports_eum_on'
AND def.scope_target_type = ' '
AND ct.target_guid = m.source_target_guid;
rem
rem VIEW em$rt_region_details_
rem
rem PURPOSE
rem Selects response time details for the time span specified.
rem This view is used to populate timeseries displays.
rem The 1 and 7 day time span selects from the hourly rollup table.
rem The 31 day time spans select from the daily rollup table.
rem
rem COLUMNS
rem see MGMT_RT_DOMAIN_1HOUR
rem
rem NOTES
rem
rem
CREATE OR REPLACE VIEW em$rt_region_details_1day
(COMPOSITE_TARGET_GUID,
COMPOSITE_TARGET_NAME, COMPOSITE_TARGET_TYPE,
TARGET_GUID,
METRIC_NAME, VISITOR_REGION,
ROLLUP_TIMESTAMP, RESPONSE_TIME_AVERAGE, RESPONSE_TIME_MINIMUM,
RESPONSE_TIME_MAXIMUM, RESPONSE_TIME_STDDEV, HITS)
AS
SELECT
m.SOURCE_TARGET_GUID,
ct.TARGET_NAME, ct.TARGET_TYPE,
m.ASSOC_TARGET_GUID,
d.METRIC_NAME, R.REGION_NAME,
d.ROLLUP_TIMESTAMP,
sum(response_time_average*hits)/sum(hits),
min(RESPONSE_TIME_MINIMUM), max(RESPONSE_TIME_MAXIMUM),
sum(RESPONSE_TIME_SDEV*hits)/sum(hits), sum(HITS)
FROM
MGMT_RT_DOMAIN_1HOUR d,
mgmt_rt_regions r,
MGMT_TARGET_ASSOCS m,
MGMT_TARGETS ct,
MGMT_TARGET_ASSOC_DEFS def
WHERE
r.target_guid = m.source_target_guid
and d.target_guid = m.assoc_target_guid
AND def.assoc_guid = m.assoc_guid
AND def.assoc_def_name = 'supports_eum_on'
AND def.scope_target_type = ' '
AND ct.target_guid = m.source_target_guid
and r.region_guid IN (select mp.region_guid /*+ INDEX(mgmt_rt_region_entries IDX_REGION_MIN_IP) */ FROM mgmt_rt_region_entries e, mgmt_rt_region_mapping mp WHERE e.id = mp.id AND ((e.min_ip >= 0 AND d.visitor_subnet_num between e.min_ip AND e.max_ip) OR (e.min_ip < 0 AND UPPER(substr('.'||d.visitor_domain, -LENGTH(e.domain)-1)) = UPPER('.'||e.domain))))
GROUP BY m.SOURCE_TARGET_GUID, m.ASSOC_TARGET_GUID,
ct.TARGET_NAME, ct.TARGET_TYPE,
d.METRIC_NAME, r.REGION_NAME, d.ROLLUP_TIMESTAMP;
CREATE OR REPLACE VIEW em$rt_region_details_7day
(COMPOSITE_TARGET_GUID,
COMPOSITE_TARGET_NAME, COMPOSITE_TARGET_TYPE,
TARGET_GUID,
METRIC_NAME, VISITOR_REGION,
ROLLUP_TIMESTAMP, RESPONSE_TIME_AVERAGE, RESPONSE_TIME_MINIMUM,
RESPONSE_TIME_MAXIMUM, RESPONSE_TIME_STDDEV, HITS)
AS
SELECT
m.SOURCE_TARGET_GUID,
ct.TARGET_NAME, ct.TARGET_TYPE,
m.ASSOC_TARGET_GUID,
d.METRIC_NAME, R.REGION_NAME,
d.ROLLUP_TIMESTAMP,
sum(response_time_average*hits)/sum(hits),
min(RESPONSE_TIME_MINIMUM), max(RESPONSE_TIME_MAXIMUM),
sum(RESPONSE_TIME_SDEV*hits)/sum(hits), sum(HITS)
FROM
MGMT_RT_DOMAIN_1HOUR d,
mgmt_rt_regions r,
MGMT_TARGET_ASSOCS m,
MGMT_TARGETS ct,
MGMT_TARGET_ASSOC_DEFS def
WHERE
r.target_guid = m.source_target_guid
and d.target_guid = m.assoc_target_guid
AND def.assoc_guid = m.assoc_guid
AND def.assoc_def_name = 'supports_eum_on'
AND def.scope_target_type = ' '
AND ct.target_guid = m.source_target_guid
and r.region_guid IN (select mp.region_guid /*+ INDEX(mgmt_rt_region_entries IDX_REGION_MIN_IP) */ FROM mgmt_rt_region_entries e, mgmt_rt_region_mapping mp WHERE e.id = mp.id AND ((e.min_ip >= 0 AND d.visitor_subnet_num between e.min_ip AND e.max_ip) OR (e.min_ip < 0 AND UPPER(substr('.'||d.visitor_domain, -LENGTH(e.domain)-1)) = UPPER('.'||e.domain))))
GROUP BY m.SOURCE_TARGET_GUID, m.ASSOC_TARGET_GUID,
ct.TARGET_NAME, ct.TARGET_TYPE,
d.METRIC_NAME, r.REGION_NAME, d.ROLLUP_TIMESTAMP;
CREATE OR REPLACE VIEW em$rt_region_details_31day
(COMPOSITE_TARGET_GUID,
COMPOSITE_TARGET_NAME, COMPOSITE_TARGET_TYPE,
TARGET_GUID,
METRIC_NAME, VISITOR_REGION,
ROLLUP_TIMESTAMP, RESPONSE_TIME_AVERAGE, RESPONSE_TIME_MINIMUM,
RESPONSE_TIME_MAXIMUM, RESPONSE_TIME_STDDEV, HITS)
AS
SELECT
m.SOURCE_TARGET_GUID,
ct.TARGET_NAME, ct.TARGET_TYPE,
m.ASSOC_TARGET_GUID,
d.METRIC_NAME, R.REGION_NAME,
d.ROLLUP_TIMESTAMP,
sum(response_time_average*hits)/sum(hits),
min(RESPONSE_TIME_MINIMUM), max(RESPONSE_TIME_MAXIMUM),
sum(RESPONSE_TIME_SDEV*hits)/sum(hits), sum(HITS)
FROM
MGMT_RT_DOMAIN_1DAY d,
mgmt_rt_regions r,
MGMT_TARGET_ASSOCS m,
MGMT_TARGETS ct,
MGMT_TARGET_ASSOC_DEFS def
WHERE
d.target_guid = m.assoc_target_guid
and r.target_guid = m.source_target_guid
and r.region_guid IN (select mp.region_guid /*+ INDEX(mgmt_rt_region_entries IDX_REGION_MIN_IP) */ FROM mgmt_rt_region_entries e, mgmt_rt_region_mapping mp WHERE e.id = mp.id AND ((e.min_ip >= 0 AND d.visitor_subnet_num between e.min_ip AND e.max_ip) OR (e.min_ip < 0 AND UPPER(substr('.'||d.visitor_domain, -LENGTH(e.domain)-1)) = UPPER('.'||e.domain))))
AND def.assoc_guid = m.assoc_guid
AND def.assoc_def_name = 'supports_eum_on'
AND def.scope_target_type = ' '
AND ct.target_guid = m.source_target_guid
GROUP BY m.SOURCE_TARGET_GUID, m.assoc_TARGET_GUID,
ct.TARGET_NAME, ct.TARGET_TYPE,
d.METRIC_NAME, r.REGION_NAME, d.ROLLUP_TIMESTAMP;
rem
rem VIEW em$rt_ip_details_
rem
rem PURPOSE
rem Selects response time details for the time span specified.
rem The 1 day time span selects from the hourly rollup table.
rem 7 and 31 day time spans select from the daily rollup table.
rem
rem COLUMNS
rem see MGMT_RT_IP_1HOUR
rem
rem NOTES
rem
CREATE OR REPLACE VIEW em$rt_ip_details_1day
(COMPOSITE_TARGET_GUID,
COMPOSITE_TARGET_NAME, COMPOSITE_TARGET_TYPE,
TARGET_GUID,
METRIC_NAME,
VISITOR_NODE,
ROLLUP_TIMESTAMP,
RESPONSE_TIME_AVERAGE, RESPONSE_TIME_MINIMUM,
RESPONSE_TIME_MAXIMUM, RESPONSE_TIME_STDDEV,
HITS)
AS
SELECT
m.source_TARGET_GUID,
ct.TARGET_NAME, ct.TARGET_TYPE,
m.ASSOC_TARGET_GUID,
d.METRIC_NAME,
d.VISITOR_NODE,
d.ROLLUP_TIMESTAMP,
d.RESPONSE_TIME_AVERAGE, d.RESPONSE_TIME_MINIMUM,
d.RESPONSE_TIME_MAXIMUM, d.RESPONSE_TIME_SDEV,
d.HITS
FROM MGMT_RT_IP_1HOUR d, MGMT_TARGET_ASSOCS m,
MGMT_TARGETS ct, MGMT_TARGET_ASSOC_DEFS def
WHERE
d.target_guid = m.assoc_target_guid
AND def.assoc_guid = m.assoc_guid
AND def.assoc_def_name = 'supports_eum_on'
AND def.scope_target_type = ' '
AND ct.target_guid = m.source_target_guid;
CREATE OR REPLACE VIEW em$rt_ip_details_7day
(COMPOSITE_TARGET_GUID,
COMPOSITE_TARGET_NAME, COMPOSITE_TARGET_TYPE,
TARGET_GUID,
METRIC_NAME,
VISITOR_NODE,
ROLLUP_TIMESTAMP,
RESPONSE_TIME_AVERAGE, RESPONSE_TIME_MINIMUM,
RESPONSE_TIME_MAXIMUM, RESPONSE_TIME_STDDEV,
HITS)
AS
SELECT
m.SOURCE_TARGET_GUID,
ct.TARGET_NAME, ct.TARGET_TYPE,
m.ASSOC_TARGET_GUID,
d.METRIC_NAME,
d.VISITOR_NODE,
d.ROLLUP_TIMESTAMP,
d.RESPONSE_TIME_AVERAGE, d.RESPONSE_TIME_MINIMUM,
d.RESPONSE_TIME_MAXIMUM, d.RESPONSE_TIME_SDEV,
d.HITS
FROM MGMT_RT_IP_1HOUR d, MGMT_TARGET_ASSOCS m,
MGMT_TARGETS ct,
MGMT_TARGET_ASSOC_DEFS def
WHERE
d.target_guid = m.assoc_target_guid
AND def.assoc_guid = m.assoc_guid
AND def.assoc_def_name = 'supports_eum_on'
AND def.scope_target_type = ' '
AND ct.target_guid = m.source_target_guid;
CREATE OR REPLACE VIEW em$rt_ip_details_31day
(COMPOSITE_TARGET_GUID,
COMPOSITE_TARGET_NAME, COMPOSITE_TARGET_TYPE,
TARGET_GUID,
METRIC_NAME,
VISITOR_NODE,
ROLLUP_TIMESTAMP,
RESPONSE_TIME_AVERAGE, RESPONSE_TIME_MINIMUM,
RESPONSE_TIME_MAXIMUM, RESPONSE_TIME_STDDEV,
HITS)
AS
SELECT
m.SOURCE_TARGET_GUID,
ct.TARGET_NAME, ct.TARGET_TYPE,
m.ASSOC_TARGET_GUID,
d.METRIC_NAME,
d.VISITOR_NODE,
d.ROLLUP_TIMESTAMP,
d.RESPONSE_TIME_AVERAGE, d.RESPONSE_TIME_MINIMUM,
d.RESPONSE_TIME_MAXIMUM, d.RESPONSE_TIME_SDEV,
d.HITS
FROM MGMT_RT_IP_1DAY d, MGMT_TARGET_ASSOCS m,
MGMT_TARGETS ct, MGMT_TARGET_ASSOC_DEFS def
WHERE
d.target_guid = m.assoc_target_guid
AND def.assoc_guid = m.assoc_guid
AND def.assoc_def_name = 'supports_eum_on'
AND def.scope_target_type = ' '
AND ct.target_guid = m.source_target_guid;
rem
rem Duplicate views, do not use
rem VIEW em$rt_loopback_details_
rem
rem PURPOSE
rem Selects url timing loopback metric response time details
rem for the time span specified.
rem The 1 and 7 day time span selects from the hourly rollup table.
rem 31 day time spans select from the daily rollup table.
rem
rem COLUMNS
rem see MGMT_RT_IP_1HOUR
rem
rem NOTES
rem
CREATE OR REPLACE VIEW em$rt_loopback_details_1day
(TARGET_GUID,
METRIC_NAME, METRIC_COLUMN, METRIC_GUID,
COLUMN_LABEL,
ROLLUP_TIMESTAMP,
VALUE_AVERAGE, VALUE_MINIMUM,
VALUE_MAXIMUM, VALUE_SDEV)
AS
SELECT
t.target_guid,
METRIC_NAME, METRIC_COLUMN, MT.METRIC_GUID, column_label,
ROLLUP_TIMESTAMP,
VALUE_AVERAGE, VALUE_MINIMUM,
VALUE_MAXIMUM, VALUE_SDEV
FROM
MGMT_METRICS_1HOUR d, MGMT_TARGETS t, MGMT_METRICS mt
WHERE mt.metric_name = 'Response'
AND mt.metric_column = 'Timing'
AND mt.metric_guid = d.metric_guid
AND d.target_guid = t.target_guid
AND t.target_type = mt.target_type
AND t.type_meta_ver = mt.type_meta_ver
AND (t.category_prop_1 = mt.category_prop_1 OR mt.category_prop_1 = ' ')
AND (t.category_prop_2 = mt.category_prop_2 OR mt.category_prop_2 = ' ')
AND (t.category_prop_3 = mt.category_prop_3 OR mt.category_prop_3 = ' ')
AND (t.category_prop_4 = mt.category_prop_4 OR mt.category_prop_4 = ' ')
AND (t.category_prop_5 = mt.category_prop_5 OR mt.category_prop_5 = ' ')
AND d.ROLLUP_TIMESTAMP >= (SYSDATE - 1);
CREATE OR REPLACE VIEW em$rt_loopback_details_7day
(TARGET_GUID,
METRIC_NAME, METRIC_COLUMN, METRIC_GUID,
COLUMN_LABEL,
ROLLUP_TIMESTAMP,
VALUE_AVERAGE, VALUE_MINIMUM,
VALUE_MAXIMUM, VALUE_SDEV)
AS
SELECT
t.target_guid,
METRIC_NAME, METRIC_COLUMN, MT.METRIC_GUID, column_label,
ROLLUP_TIMESTAMP,
VALUE_AVERAGE, VALUE_MINIMUM,
VALUE_MAXIMUM, VALUE_SDEV
FROM
MGMT_METRICS_1DAY d, MGMT_TARGETS t, MGMT_METRICS mt
WHERE mt.metric_name = 'Response'
AND mt.metric_column = 'Timing'
AND mt.metric_guid = d.metric_guid
AND d.target_guid = t.target_guid
AND t.target_type = mt.target_type
AND t.type_meta_ver = mt.type_meta_ver
AND (t.category_prop_1 = mt.category_prop_1 OR mt.category_prop_1 = ' ')
AND (t.category_prop_2 = mt.category_prop_2 OR mt.category_prop_2 = ' ')
AND (t.category_prop_3 = mt.category_prop_3 OR mt.category_prop_3 = ' ')
AND (t.category_prop_4 = mt.category_prop_4 OR mt.category_prop_4 = ' ')
AND (t.category_prop_5 = mt.category_prop_5 OR mt.category_prop_5 = ' ')
AND d.ROLLUP_TIMESTAMP >= (SYSDATE - 7);
CREATE OR REPLACE VIEW em$rt_loopback_details_31day
(TARGET_GUID,
METRIC_NAME, METRIC_COLUMN, METRIC_GUID,
COLUMN_LABEL,
ROLLUP_TIMESTAMP,
VALUE_AVERAGE, VALUE_MINIMUM,
VALUE_MAXIMUM, VALUE_SDEV)
AS
SELECT
t.target_guid,
METRIC_NAME, METRIC_COLUMN, MT.METRIC_GUID, column_label,
ROLLUP_TIMESTAMP,
VALUE_AVERAGE, VALUE_MINIMUM,
VALUE_MAXIMUM, VALUE_SDEV
FROM
MGMT_METRICS_1DAY d, MGMT_TARGETS t, MGMT_METRICS mt
WHERE mt.metric_name = 'Response'
AND mt.metric_column = 'Timing'
AND mt.metric_guid = d.metric_guid
AND d.target_guid = t.target_guid
AND t.target_type = mt.target_type
AND t.type_meta_ver = mt.type_meta_ver
AND (t.category_prop_1 = mt.category_prop_1 OR mt.category_prop_1 = ' ')
AND (t.category_prop_2 = mt.category_prop_2 OR mt.category_prop_2 = ' ')
AND (t.category_prop_3 = mt.category_prop_3 OR mt.category_prop_3 = ' ')
AND (t.category_prop_4 = mt.category_prop_4 OR mt.category_prop_4 = ' ')
AND (t.category_prop_5 = mt.category_prop_5 OR mt.category_prop_5 = ' ')
AND d.ROLLUP_TIMESTAMP >= (SYSDATE - 31);
rem
rem Duplicate views, do not use
rem VIEW em$rt_metrics_details_
rem
rem PURPOSE
rem Selects 'Response' metric time details
rem for the time span specified.
rem The 1 and 7 day time span selects from the hourly rollup table.
rem 31 day time spans select from the daily rollup table.
rem
rem COLUMNS
rem see MGMT_RT_IP_1HOUR
rem
rem NOTES
rem
CREATE OR REPLACE VIEW em$rt_metrics_details_1day
(COMPOSITE_TARGET_GUID,
COMPOSITE_TARGET_NAME, COMPOSITE_TARGET_TYPE,
METRIC_NAME, METRIC_COLUMN,
COLUMN_LABEL,
ROLLUP_TIMESTAMP,
VALUE_AVERAGE, VALUE_MINIMUM,
VALUE_MAXIMUM, VALUE_SDEV)
AS
SELECT
d.target_guid,
t.target_name, t.target_type,
METRIC_NAME, METRIC_COLUMN,
column_label,
ROLLUP_TIMESTAMP,
VALUE_AVERAGE, VALUE_MINIMUM,
VALUE_MAXIMUM, VALUE_SDEV
FROM
MGMT_METRICS_1HOUR d, MGMT_METRICS mt, MGMT_TARGETS t
WHERE
ROLLUP_TIMESTAMP >= (SYSDATE - 1)
AND d.metric_guid = mt.metric_guid
AND d.target_guid = t.target_guid
AND mt.metric_name = 'Response'
AND mt.metric_column != 'Status'
AND mt.metric_column is not null
AND mt.metric_type = 0
AND t.target_type = mt.target_type
AND t.type_meta_ver = mt.type_meta_ver
AND (t.category_prop_1 = mt.category_prop_1 OR mt.category_prop_1 = ' ')
AND (t.category_prop_2 = mt.category_prop_2 OR mt.category_prop_2 = ' ')
AND (t.category_prop_3 = mt.category_prop_3 OR mt.category_prop_3 = ' ')
AND (t.category_prop_4 = mt.category_prop_4 OR mt.category_prop_4 = ' ')
AND (t.category_prop_5 = mt.category_prop_5 OR mt.category_prop_5 = ' ');
CREATE OR REPLACE VIEW em$rt_metrics_details_7day
(COMPOSITE_TARGET_GUID,
COMPOSITE_TARGET_NAME, COMPOSITE_TARGET_TYPE,
METRIC_NAME, METRIC_COLUMN,
COLUMN_LABEL,
ROLLUP_TIMESTAMP,
VALUE_AVERAGE, VALUE_MINIMUM,
VALUE_MAXIMUM, VALUE_SDEV)
AS
SELECT
d.target_guid,
t.target_name, t.target_type,
METRIC_NAME, METRIC_COLUMN,
column_label,
ROLLUP_TIMESTAMP,
VALUE_AVERAGE, VALUE_MINIMUM,
VALUE_MAXIMUM, VALUE_SDEV
FROM
MGMT_METRICS_1HOUR d, MGMT_METRICS mt, MGMT_TARGETS t
WHERE
ROLLUP_TIMESTAMP >= (SYSDATE - 7)
AND d.metric_guid = mt.metric_guid
AND d.target_guid = t.target_guid
AND mt.metric_name = 'Response'
AND mt.metric_column != 'Status'
AND mt.metric_column is not null
AND mt.metric_type = 0
AND t.target_type = mt.target_type
AND t.type_meta_ver = mt.type_meta_ver
AND (t.category_prop_1 = mt.category_prop_1 OR mt.category_prop_1 = ' ')
AND (t.category_prop_2 = mt.category_prop_2 OR mt.category_prop_2 = ' ')
AND (t.category_prop_3 = mt.category_prop_3 OR mt.category_prop_3 = ' ')
AND (t.category_prop_4 = mt.category_prop_4 OR mt.category_prop_4 = ' ')
AND (t.category_prop_5 = mt.category_prop_5 OR mt.category_prop_5 = ' ');
CREATE OR REPLACE VIEW em$rt_metrics_details_31day
(COMPOSITE_TARGET_GUID,
COMPOSITE_TARGET_NAME, COMPOSITE_TARGET_TYPE,
METRIC_NAME, METRIC_COLUMN,
COLUMN_LABEL,
ROLLUP_TIMESTAMP,
VALUE_AVERAGE, VALUE_MINIMUM,
VALUE_MAXIMUM, VALUE_SDEV)
AS
SELECT
d.target_guid,
t.target_name, t.target_type,
METRIC_NAME, METRIC_COLUMN,
column_label,
ROLLUP_TIMESTAMP,
VALUE_AVERAGE, VALUE_MINIMUM,
VALUE_MAXIMUM, VALUE_SDEV
FROM
MGMT_METRICS_1HOUR d, MGMT_METRICS mt, MGMT_TARGETS t
WHERE
ROLLUP_TIMESTAMP >= (SYSDATE - 31)
AND d.metric_guid = mt.metric_guid
AND d.target_guid = t.target_guid
AND mt.metric_name = 'Response'
AND mt.metric_column != 'Status'
AND mt.metric_column is not null
AND mt.metric_type = 0
AND t.target_type = mt.target_type
AND t.type_meta_ver = mt.type_meta_ver
AND (t.category_prop_1 = mt.category_prop_1 OR mt.category_prop_1 = ' ')
AND (t.category_prop_2 = mt.category_prop_2 OR mt.category_prop_2 = ' ')
AND (t.category_prop_3 = mt.category_prop_3 OR mt.category_prop_3 = ' ')
AND (t.category_prop_4 = mt.category_prop_4 OR mt.category_prop_4 = ' ')
AND (t.category_prop_5 = mt.category_prop_5 OR mt.category_prop_5 = ' ');
rem
rem VIEW em$rt_watch_list_