軟件環境 Windows 2000 + Oracle9i
硬件環境 CPU 1.8G + RAM 512M
現在我們有2張表 如下:
T1--大表 10000筆 T1_FK_ID
T2--小表 5000筆 T2_PK_ID
T1通過表中字段ID與T2的主鍵ID關聯
模擬數據如下:
--T2有5000筆數據
create table T2
as
select rownum id, a.*
from all_objects a
where 1=0;
-- Create/Recreate primary, unique and foreign key constraints
alter table T2
add constraint T2_PK_ID primary key (ID);
insert /*+ APPEND */ into T2
select rownum id, a.*
from all_objects a where rownum<=5000;
--T1有10000筆數據
create table T1
as
select rownum sid, T2.*
from T2
where 1=0;
-- Create/Recreate primary,