The test procedure is as follows:
Create Table sales
As select * From Sh. sales;
Create Table MERs
As
Select * From Sh. customers;
Create unique index cust_id_un on MERs (cust_id );
Create:
Bitmap join Indexes
Create bitmap index sales_cust_gender_bjix
On Sales (customers. cust_gender)
From sales, MERS MERs
Where sales. cust_id = customers. cust_id;
The following error is reported:
Row 3 has an error:
ORA-25954: Missing primary key or unique constraint for a dimension
Case study: although the unique index of table MERs Mers is defined here, this index does not have a unique constraint on table customers, that is, it does not mean that the table is unique; however, if the uniqueness constraint is added, no error is reported. The example is as follows:
SQL> ALTER TABLE MERs
2 modify (cust_id constraint customers_un unique );
The table has been changed.
SQL> Create bitmap index sales_cust_gender_bjix
2 on sales (customers. cust_gender)
3 from sales, MERS MERs
4 where sales. cust_id = customers. cust_id;
The index has been created.
Conclusion:
As long as the uniqueness constraint is added, no error is reported when you create bji.