alter table emp19
modify telecom varchar(30);
create cluster c_emp19_telecom_hash
(telecom varchar2(30) )
size 1024
hashkeys 10;
create table emp19_cluster
cluster c_emp19_telecom_hash(telecom)
as
select *
from emp19
where 1 = 2;
create table telecom_table_cluster
cluster c_emp19_telecom_hash(telecom)
as
select *
from telecom_table
where 1 = 2;
insert into emp19_cluster
select *
from emp19;
insert into telecom_table_cluster
select *
from telecom_table;
commit;
-- 튜닝전:
select e.ename, e.age, e.address, t.t_price
from emp19 e, telecom_table t
where e.telecom = t.telecom and e.telecom = 'kt';
--- 튜닝후:
select e.ename, e.age, e.address, t.t_price
from emp19_cluster e, telecom_table_cluster t
where e.telecom = t.telecom and e.telecom = 'kt';