如何确定哪个表空间读写频繁?
select name,phyrds,phywrts,readtim,writetim
from v$filestat a,v$dbfile b
where a.file# = b.file#
order by readtim desc
在磁盘上的物理写入和读取次数上如果出现很大的差别,就表明肯定有哪个磁盘负载过多!
如果出现磁盘负载不平衡,可以通过移动数据文件来均衡文件I/O:
alter tablespace tablespace_name offline;
$cp /disk1/a.dbf /disk2/a.dbf;
alter tablespace tablespace_name rename datafile ‘/disk1/a.dbf’ to ‘/disk2/a.dbf’;
alter tablespace tablespace online;
$rm /disk1/a.dbf
