Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Problems with Clustering
Oracle Software Owner wrote:
>
> Hallo to everybody!
>
> I have some Problems with clustering tables:
> There are 3 tables like:
>
> CREATE TABLE tab_a
> (id_tab_a INTEGER,
> col_a1 char()
> );
>
> CREATE TABLE tab_b
> (id_tab_b INTEGER,
> id_tab_a INTEGER CONSTRAINT FKb1 REFERENCES tab_a (id_tab_a),
> id_tab_x INTEGER CONSTRAINT FKb2 REFERENCES tab_x (id_tab_x)
> );
>
> CREATE TABLE tab_c
> (id_tab_c INTEGER,
> id_tab_a INTEGER CONSTRAINT FKc1 REFERENCES tab_a (id_tab_a),
> id_tab_y INTEGER CONSTRAINT FKc2 REFERENCES tab_y (id_tab_y)
> );
>
> I now wanted to create a cluster for tab_b with the foreign keys
> id_tab_a and id_tab_x and another cluster for table tab_c with
> id_tab_a and id_tab_y.
>
> How can I assign these Clusters to table tab_a?
>
> I tried out to create cluster with cluster-option, but it's just as
> little possible as to assign two clusters to one table or to assign
> only a few
> columns of a cluster to one table.
>
> So is it possible to cluster these columns in the shown way and - if yes
> -
> how to?
It sounds like you're going at this backwards. First you create the cluster, then you create the table(s) and specify the cluster which they should be a part of and the column(s) of the table which correspond to the cluster columns. Refer to the CREATE CLUSTER and CREATE TABLE statements in the SQL Language Reference Manual.
![]() |
![]() |