原本有两个表,t0201_gsinfo_registerd、t0101_enterprise_base各有8万多条记录。
后来,建了聚簇和聚簇索引:
create cluster BOOKandAUTHOR (Col1 VARCHAR2(100));
 create  index  bookssss on cluster BOOKandAUTHOR;
并建了另外两个表结构和数据都完全相同表:h0201_gsinfo_registerd、tj0101_enterprise_base,用它们的chinese_name字段建了索引。
结果,发现测试的查询结果如下:
建聚簇前:
select count(*) from t0201_gsinfo_registerd t where t.chinese_name in (select a.chinese_name from  t0101_enterprise_base a)  结果83117,执行时间1.4秒。
select count(*) from t0201_gsinfo_registerd t,t0101_enterprise_base a where t.chinese_name=a.chinese_name  执行时间1.2秒。
select * from t0201_gsinfo_registerd t where t.chinese_name='上海无狄食用菌科技有限公司'  执行时间0.3秒。
select * from t0201_gsinfo_registerd t, t0101_enterprise_base a where t.chinese_name=a.chinese_name
and  t.chinese_name='上海彩铺工艺品有限公司' or  a.chinese_name='胜科临富(上海)机械制造有限公司'  23行,执行时间1.56秒。建聚簇后:
select count(*) from h0201_gsinfo_registerd t where t.chinese_name in (select a.chinese_name from  h0101_enterprise_base a)  结果83117,执行时间1301秒。
select * from h0201_gsinfo_registerd t, h0101_enterprise_base a where t.chinese_name=a.chinese_name  执行时间345秒。
select * from t0201_gsinfo_registerd t where t.chinese_name='上海无狄食用菌科技有限公司'  执行时间0.3秒。
select * from h0201_gsinfo_registerd t, h0101_enterprise_base a where t.chinese_name=a.chinese_name
and  t.chinese_name='上海彩铺工艺品有限公司' or  a.chinese_name='胜科临富(上海)机械制造有限公司'  23行,执行时间0.21秒。
其余试的其语句,建聚簇后都要慢得多。