如题.环境为:WIN2003+ORACLE9.2+ASP访问ORACLE ,进去任务管理中查看时发现CPU有时到100%,有时会降下来10%,平均都在60%左右.不知如何解决这个问题.
解决方案 »
- ORA-0000: normal, successful completion
- insert语句写到配置文件中
- 有谁了解或熟悉Oracle的HTB平台?
- sql查询请教
- 高手帮忙解决一个问题!
- vb6连接oracle数据库如何发布.
- Oracle Enterprise Management Console 中的菜单上“分析”有什么用?
- 空字段如何显示为0?
- oracle9i安装完毕后提示说监听程序启动失败,监听程序己开启!用system也进入不了管理界面?在线等,马上结帐!
- 如果過程中有游標參數,怎麼測試呢?我用的是pl/sql developer...
- 如何复制数据表oracle==〉sql server?
- 电脑重起,ORACLE不能自动启动,只能用带参数启动
EXECUTIONS,SORTS,COMMAND_TYPE,DISK_READS,
sql_text FROM v$sqlarea ORDER BY disk_reads DESC)
WHERE ROWNUM<10;查找10条性能差的语句
select count(1) as msgcount from ( select 1 from 留言表 where 回复数=0 and trunc(留言时间) between trunc(sysdate-20) and trunc(sysdate-3) and 留言人='张三' and 父留言id is null Union all select 1 from TAB_留言表_NEW where to部门='财务' and trunc(留言时间) > trunc(sysdate-20) and 留言人<>'张三' and 留言id Not In ( Select distinct 留言id from 查看表 where 收信部门='财务' and 阅读人='张三' and trunc(阅读时间)>trunc(sysdate-20) ) ) a
--------------------------------------------------------------
表结构:
1.留言表
留言ID VARCHAR2(10) not null,
主题 VARCHAR2(50),
称呼 VARCHAR2(100),
内容 VARCHAR2(1000),
留言时间 DATE,
留言部门 VARCHAR2(100),
留言人 VARCHAR2(10)
)
2.查看表
(
留言ID VARCHAR2(10) not null,
收信部门 VARCHAR2(30) not null,
阅读人 VARCHAR2(30) not null,
阅读时间 DATE
)
select count(1) as msgcount from ( select 1 from 留言表 where 回复数=0 and trunc(留言时间) between trunc(sysdate-20) and trunc(sysdate-3) and 留言人='张三' and 父留言id is null Union all select 1 from 留言表_NEW where to部门='财务' and trunc(留言时间) > trunc(sysdate-20) and 留言人<>'张三' and 留言id Not In ( Select distinct 留言id from 查看表 where 收信部门='财务' and 阅读人='张三' and trunc(阅读时间)>trunc(sysdate-20) ) ) a
表结构:
1.留言表(
留言ID VARCHAR2(10) not null,
主题 VARCHAR2(50),
称呼 VARCHAR2(100),
内容 VARCHAR2(1000),
留言时间 DATE,
留言部门 VARCHAR2(100),
留言人 VARCHAR2(10),
运单号 VARCHAR2(20),
父留言ID VARCHAR2(10),
类型 VARCHAR2(10),
TO部门 VARCHAR2(10),
TO用户 VARCHAR2(10),
回复数 NUMBER(6),
浏览数 NUMBER(6)
)
2.查看表
(
留言ID VARCHAR2(10) not null,
收信部门 VARCHAR2(30) not null,
阅读人 VARCHAR2(30) not null,
阅读时间 DATE
)
--------------
上面有误,,以这个为准
我将{查看表}加了索引:阅读时间+收信部门 + 阅读人;还是FULL的.没有改进