Hello,
Thanks for writing this article, in my search for a solution of a performance problem I ran into your post and it has helped me partly so far. I do have a question though:
You're saying "This same statement executed outside of the view uses an Index Seek on both tables.", can you show what statement that is? If I try:
SELECT accountnumber FROM (
SELECT accountnumber FROM agents2009
UNION ALL
SELECT accountnumber FROM agents
)
vwInline WHERE accountnumber = 'QOT039365'
I don't see any difference in the queryplan from replacing the subquery with the view.
regards,
Sebastiaan
The normal form of a database is inversely proportional to that of the designer
(This message was generated with 100% recycled electrons)