- 最后登录
- 2018-11-1
- 在线时间
- 377 小时
- 威望
- 29
- 金钱
- 6866
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 891
- 精华
- 4
- 积分
- 29
- UID
- 1
|
2#
发表于 2016-8-11 15:08:48
select 1
from (select SYS_INT_ID, NE_DN
from zjdxlte.tmp_cm_disc_subnet_info
where type_dn = 'SUBNETWORK'
and view_name = 'OMC'
and invoke_id = 20065) tmp,
(select SM_COLLECTOR_DEPLOY.SYS_INT_ID "ID",
SM_COLLECTOR_DEPLOY.NE_DN "KEY"
from zjdxlte.SM_COLLECTOR_DEPLOY, zjdxlte.OBJECTS_EXS
where (SM_COLLECTOR_DEPLOY.SYS_INT_ID = OBJECTS_EXS.SYS_INT_ID)
and (SM_COLLECTOR_DEPLOY.NE_DN = OBJECTS_EXS.NE_DN)
and OBJECTS_EXS.NE_CLASS = 6) "subnetwork",
(select C_LTE_ANT_INFO.NE_DN "KEY",
C_LTE_ANT_INFO.SYS_INT_ID "ID",
C_LTE_ANT_INFO.SUBNET_ID "SUBNET_ID",
C_LTE_ANT_INFO.NE_NAME "NAME"
from zjdxlte.C_LTE_ANT_INFO, zjdxlte.OBJECTS_EXS
where (C_LTE_ANT_INFO.SYS_INT_ID = OBJECTS_EXS.SYS_INT_ID)
and (C_LTE_ANT_INFO.NE_DN = OBJECTS_EXS.NE_DN)
and C_LTE_ANT_INFO.NE_CLASS = 355) "ant"
where tmp.SYS_INT_ID = "subnetwork".ID
and "subnetwork".ID = "ant".SUBNET_ID
执行 语句 给出结果
- set linesize 300 pagesize 3000
- set long 99999
- SELECT *
- FROM (SELECT '1.v$sql'||'实例号:'||GV$SQL.inst_id source,
- SQL_ID,
- plan_hash_value,
- TO_CHAR (FIRST_LOAD_TIME) begin_time,
- '在cursor cache中' end_time,
- executions "No. of exec",
- (buffer_gets / executions) "LIO/exec",
- (cpu_time / executions / 1000000) "CPUTIM/exec",
- (elapsed_time / executions / 1000000) "ETIME/exec",
- (disk_reads / executions) "PIO/exec",
- (ROWS_PROCESSED / executions) "ROWs/exec"
- FROM Gv$SQL
- WHERE sql_id = '6y377cz3r7t39'
- UNION ALL
- SELECT '2.sqltuning set' source,
- sql_id,
- plan_hash_value,
- 'JUST SQLSET NO DATE' begin_time,
- 'JUST SQLSET NO DATE' end_time,
- EXECUTIONS "No. of exec",
- (buffer_gets / executions) "LIO/exec",
- (cpu_time / executions / 1000000) "CPUTIM/exec",
- (elapsed_time / executions / 1000000) "ETIME/exec",
- (disk_reads / executions) "PIO/exec",
- (ROWS_PROCESSED / executions) "ROWs/exec"
- FROM dba_sqlset_statements
- WHERE SQL_ID = '6y377cz3r7t39'
- UNION ALL
- SELECT '3.dba_advisor_sqlstats' source,
- sql_id,
- plan_hash_value,
- 'JUST SQLSET NO DATE' begin_time,
- 'JUST SQLSET NO DATE' end_time,
- EXECUTIONS "No. of exec",
- (buffer_gets / executions) "LIO/exec",
- (cpu_time / executions / 1000000) "CPUTIM/exec",
- (elapsed_time / executions / 1000000) "ETIME/exec",
- (disk_reads / executions) "PIO/exec",
- (ROWS_PROCESSED / executions) "ROWs/exec"
- FROM dba_sqlset_statements
- WHERE SQL_ID = '6y377cz3r7t39'
- UNION ALL
- SELECT DISTINCT
- '4.dba_hist_sqlstat' || '实例号:' || SQL.INSTANCE_NUMBER
- source,
- sql_id,
- PLAN_HASH_VALUE,
- TO_CHAR (s.BEGIN_INTERVAL_TIME ,'YYYY-MM-DD hh24:mi:ss') begin_time,
- TO_CHAR (s.END_INTERVAL_TIME,'YYYY-MM-DD hh24:mi:ss') end_time,
- SQL.executions_delta,
- SQL.buffer_gets_delta
- / DECODE (NVL (SQL.executions_delta, 0),
- 0, 1,
- SQL.executions_delta)
- "LIO/exec",
- (SQL.cpu_time_delta / 1000000)
- / DECODE (NVL (SQL.executions_delta, 0),
- 0, 1,
- SQL.executions_delta)
- "CPUTIM/exec",
- (SQL.elapsed_time_delta / 1000000)
- / DECODE (NVL (SQL.executions_delta, 0),
- 0, 1,
- SQL.executions_delta)
- "ETIME/exec",
- SQL.DISK_READS_DELTA
- / DECODE (NVL (SQL.executions_delta, 0),
- 0, 1,
- SQL.executions_delta)
- "PIO/exec",
- SQL.ROWS_PROCESSED_DELTA
- / DECODE (NVL (SQL.executions_delta, 0),
- 0, 1,
- SQL.executions_delta)
- "ROWs/exec"
- FROM dba_hist_sqlstat SQL, dba_hist_snapshot s
- WHERE SQL.INSTANCE_NUMBER = s.INSTANCE_NUMBER
- AND SQL.dbid = (SELECT dbid FROM v$database)
- AND s.snap_id = SQL.snap_id
- AND sql_id IN ('6y377cz3r7t39'))
- ORDER BY source, begin_time DESC;
- @?/rdbms/admin/sqltrpt
- 6y377cz3r7t39
复制代码 |
|