In our dimensional data warehouse we have a fact table with foreign keys to dimension tables. In some cases, a view is used for a dimension table to reuse the underlying generic table. The fact table key field has a foreign key referencing the
underlying dimension. However, the join elimination is not working with these views.
Suppose I have a view for DimShippingDate that is based on DimDate, with the key DateKey just renamed to ShippingDateKey. In my fact table I have a foreign key on ShippingDateKey that references DateKey in DimDate. If I do not use ShippingDate in my query, the join to DimDate is still not eliminated. This seems to be the case for all my virtual dimensions. Is there something else I need to do for the optimizer to know the join can be eliminated?