I have created a view from another view.
The create statement is:
CREATE VIEW [dbo].[SERVICEDESK_INCIDENTVIEW_TEMP] WITH SCHEMABINDING AS
SELECT Id,State, Title, Description, Resolution, Resp_Viol_Reason, Resol_Viol_Reason,
IncidentType, SourceType_ID, Parent_Incident_ID, FirstCallResolution, CompanyDeleted
The view SERVICEDESK_INCIDENTVIEW_TEMP is created successfully.
I wanted to create a unique clustered index on this view. MY statement is:
create unique clustered index INCIDENT_ID_SERVICEDESK_INCIDENTVIEW_TEMP on SERVICEDESK_INCIDENTVIEW_TEMP(Id)
When I run the above query I got the following error.
Cannot create index on view 'WIPRO_EHELPLINE.dbo.SERVICEDESK_INCIDENTVIEW_TEMP'
because it references another view 'DBO.servicedesk_incidentview'.
Consider expanding referenced view's definition by hand in indexed view definition.
I have performance issue in my application. This view contains more than 5 lakh records.
Please help me how to create unique clustered index on this view. So that my queries performance will increase.
Thanks in advance.
Who is wise? He that learns from everyone. Who is powerful? He that governs his passions. Who is rich? He that is content. Who is that? Nobody.