[SQL 2012] Join elimination not working with view |
Join elimination not working with view Posted: 13 May 2013 01:37 AM PDT It seems that join elimination is not occurring when a table has a foreign key to the table underlying a view. Is there something else I need to do for the optimizer to know the join to a view can be eliminated?In our dimensional model, we have a view for DimApplicationDate that is based on DimDate, simply renaming DateKey to ApplicationDateKey. In my fact table I have a foreign key on ApplicationDateKey that references DateKey in DimDate. If I do not use ApplicationDate in my query, the join to DimDate is still not eliminated. This seems to be the case for all my virtual dimensions. |
You are subscribed to email updates from SQLServerCentral / SQL Server 2012 / SQL 2012 - General To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
No comments:
Post a Comment