Indexed View vs. Table

198 Views Asked by At

I had a long running query (relative to the data) that was hitting an indexed view. I thought an indexed view was physically stored data? I dumped everything into a table and ran the same query against the table and found that it executed almost 3x as fast. I was under the impression, which apparently was wrong, that an indexed view would act the same as a physical table in terms of performance. Just looking for an explanation.

1

There are 1 best solutions below

0
On BEST ANSWER

What edition of SQL Server are you running under? Downlevel editions require the use of the NOEXPAND query hint in order to benefit most from the indexed view. – Damien_The_Unbeliever

This was the answer, thanks again