Ray Herring (4/8/2014)
The direction of the discussion has strayed a little bit from the original topic:-PThe behavior you guys are discussing is not specific to Views. it is general behavior of the query engine. The query engine will eliminate tables from any query when Referential Integrity is full declared and the various constraints are trusted. Table Elimination is a feature of most DB engines (you can find web references to Oracle and others).
I am not saying the discussion is not interesting, I just want to point out that the behavior is not specifically caused by Views. It is more related to fully implemented DRI.
Absolutely agreed but I wouldn't call it "strayed". Views are queries, too! 🙂 Like Jose said, this sidebar came up because table elimination not only wasn't mentioned but a statement to the contrary was.
--Jeff Moden
Change is inevitable... Change for the better is not.