多表连接速度慢,试着在两个表上建立cluster。
两个表还不在同一个 schema下面:
试着将他们建立在同一个schema下面,
SQL> create table cmdb.configuration_item_cluster1 cluster monitor_items_cluster(target_cs_uuid) as select
2 * from cmdb.configuration_item;
create table cmdb.configuration_item_cluster1 cluster monitor_items_cluster(target_cs_uuid) as select
*
ERROR at line 1:
ORA-00945: specified clustered column does not exist
SQL> drop cluster avail.monitor_items_cluster;
drop cluster avail.monitor_items_cluster
*
ERROR at line 1:
ORA-00943: cluster does not exist
SQL> drop index monitor_items_cluster_index;
Index dropped.
SQL> drop cluster monitor_items_cluster;
drop cluster monitor_items_cluster
*
ERROR at line 1:
ORA-00951: cluster not empty
SQL> drop cluster monitor_items_cluster including tables;
Cluster dropped.
用下面的办法建立CLUSTER.
CREATE CLUSTER monitor_items_cluster(target_cs_uuid varchar2(64))SIZE 1024;
CREATE INDEX monitor_items_cluster_index ON CLUSTER monitor_items_cluster;
create table monitor_items_cluster1 cluster monitor_items_cluster(target_cs_uuid) as select * from avail.monitor_items ;
create table configuration_item_cluster1 cluster monitor_items_cluster(uuid) as select * from cmdb.configuration_item;