I have a very large database (several TB) where I am doing a complex inner join between three tables. The largest of the tables has a simple View on it. In fact, it looks pretty much just like the base table. No compute columns, no UDFs, etc.
However, when I use the View in the query, versus the table, the query is much slower: for example, 37 minutes vs about 8 minutes for a query on the table. Subsquent queries are better (e.g., 30 seconds via the View vs. 5 seconds via the table).
It is SQL 2008 R2 on Windows 2008 R2 with plenty of power.
Is this to be expected? Do simple Views put that much of a drag on performance? How can I go about improving the performance through the View?
Thanks.