Home > Database > Mysql Tutorial > Oracle中的高水位(HWM)

Oracle中的高水位(HWM)

WBOY
Release: 2016-06-07 17:13:57
Original
1158 people have browsed it

Linux公社(www.linuxidc.com)是专业的Linux系统门户网站,实时发布最新Linux资讯,包括Linux、Ubuntu、Fedora、RedHat、红旗Linux、Linux教程、Linux认证、SUSE

Oracle中的高水位(HWM)

找一个记录数较多的表,,100万条以前的,如表test1。

create table test2 as select * from test1 where 1=2;

insert into test2 select * from test1;

在insert执行完成之前强制中断session。

此时执行select * from test2;虽然test2中没有任何记录但需要很长时间。

解决办法:

方法1:truncate table test2;

方法2:

alter table test2 enable row movement;

alter table test2 shrink space;

再执行select * from test2;应该在0.1秒以内。

更多Oracle相关信息见Oracle 专题页面 ?tid=12

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template