I'm told a view doesn't take up space in a DB. In that case, it's just a query (compiled SQL), right?
And if it's just a query, how can it be indexed?
And if it's just a query, how can it have a clustered index? What would be the difference - if it's just a query - between a clustered index and a nonclustered index?
If I give it a clustered index, will this index be fragmented over time and thus need to be rebuilt/reorgnized?
If I give it a nonclustered index, will this index be fragmented over time and thus need to be rebuilt/reorgnized?
Would I likely get nearly-as-good performance by going with a CTE instead of a view?
I suppose someone will say, "Just try it and see how it works". Easier said than done, because I have multiple SPs that I will have to rewrite to run these tests, so I'm hoping to save some time by getting some solid recommendations on this thread.
And if it's just a query, how can it be indexed?
And if it's just a query, how can it have a clustered index? What would be the difference - if it's just a query - between a clustered index and a nonclustered index?
If I give it a clustered index, will this index be fragmented over time and thus need to be rebuilt/reorgnized?
If I give it a nonclustered index, will this index be fragmented over time and thus need to be rebuilt/reorgnized?
Would I likely get nearly-as-good performance by going with a CTE instead of a view?
I suppose someone will say, "Just try it and see how it works". Easier said than done, because I have multiple SPs that I will have to rewrite to run these tests, so I'm hoping to save some time by getting some solid recommendations on this thread.