SQL Server supports creating indexes on a view. It is the same concept as Materialized Views in Oracle. The main difference in the syntax in normal views and indexed views is the clause “with schemabinding”
CREATE VIEW [dbo].[ViewName] with schemabinding
SELECT id, activityID, userID, value, date
WHERE (field = ‘activityID’)
Now you go ahead and create the index on the view you just created.
CREATE UNIQUE CLUSTERED INDEX [IDX_ActivityStatusID] ON [dbo].[ViewName]
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]