Oracle交换分区的操作步骤如下: 1. 创建分区表t1,假设有2个分区,P1,P2.2. 创建基表t11存放P1规则的数据。3. 创建基表t12 存
oracle交换分区的操作步骤如下:
1. 创建分区表t1,假设有2个分区,P1,P2.
2. 创建基表t11存放P1规则的数据。
3. 创建基表t12 存放P2规则的数据。
4. 用基表t11和分区表T1的P1分区交换。 把表t11的数据放到到P1分区
5. 用基表t12 和分区表T1p2 分区交换。 把表t12的数据存放到P2分区。
----1.未分区表和分区表中一个分区交换
create table t1
(
sid int not null primary key,
sname varchar2(50)
)
PARTITION BY range(sid)
( PARTITION p1 VALUES LESS THAN (5000) tablespace test,
PARTITION p2 VALUES LESS THAN (10000) tablespace test,
PARTITION p3 VALUES LESS THAN (maxvalue) tablespace test
) tablespace test;
SQL> select count(*) from t1;
COUNT(*)
----------
0
create table t11
(
sid int not null primary key,
sname varchar2(50)
) tablespace test;
create table t12
(
sid int not null primary key,
sname varchar2(50)
) tablespace test;
create table t13
(
sid int not null primary key,
sname varchar2(50)
) tablespace test;
--循环导入数据
declare
maxrecords constant int:=4999;
i int :=1;
begin
for i in 1..maxrecords loop
insert into t11 values(i,'ocpyang');
end loop;
dbms_output.put_line(' 成功录入数据! ');
commit;
end;
/
declare
maxrecords constant int:=9999;
i int :=5000;
begin
for i in 5000..maxrecords loop
insert into t12 values(i,'ocpyang');
end loop;
dbms_output.put_line(' 成功录入数据! ');
commit;
end;
/
declare
maxrecords constant int:=70000;
i int :=10000;
begin
for i in 10000..maxrecords loop
insert into t13 values(i,'ocpyang');
end loop;
dbms_output.put_line(' 成功录入数据! ');
commit;
end;
/
commit;
SQL> select count(*) from t11;
COUNT(*)
----------
4999
本文档主要讲述的是MATLAB与VB混合编程技术研究;着重探讨了在VB应用程序中集成MATLAB实现程序优化的四种方法,即利用Matrix VB、调用DLL动态链接库、应用Active自动化技术和动态数据交换技术,并分析了集成过程中的关键问题及其基本步骤。这种混合编程实现了VB的可视化界面与MATLAB强大的数值分析能力的结合。希望本文档会给有需要的朋友带来帮助;感兴趣的朋友可以过来看看
0
SQL> select count(*) from t12;
COUNT(*)
----------
5000
SQL> select count(*) from t13;
COUNT(*)
----------
60001
--交换分区
alter table t1 exchange partition p1 with table t11;
SQL> select count(*) from t11; --基表t11数据为0
COUNT(*)
----------
0
SQL> select count(*) from t1 partition (p1); --分区表的P1分区数据位基表t11的数据
COUNT(*)
----------
4999
alter table t1 exchange partition p2 with table t12;
select count(*) from t12;
select count(*) from t1 partition (p2);
alter table t1 exchange partition p3 with table t13;
select count(*) from t13;
select count(*) from t1 partition (p3);

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号