Say I have an indexed view that looks like this:
ALTER VIEW dbo.MyIndexedView WITH SCHEMABINDING AS SELECT ord.SomeColumn, COUNT_BIG(*) AS Count FROM dbo.Ordered ord WHERE ord.CreatedWhen > CONVERT(DATETIME, '2014-11-01', 121) GROUP BY ord.SomeColumn GO CREATE UNIQUE CLUSTERED INDEX [CIX_MyIndexedView] ON dbo.MyIndexedView (SomeColumn) GO
If I change the date time value in this view (say to '2014-11-01') then the clustered index needs to be regenerated.
Is there a way to have the existing view and index stay in effect until the new one is totally built and then have them swap? Similar to