I have a select query to retrieve data from tables. It is working fine, but when there’s a condition to select some 3 values, it is not giving a result. Error message;
Query processor ran out of Internal resources
I looked through INDEX seems to work fine, then I created view with that select statement, but couldn’t create an index. Error message;
View is not schema bound
In order to create an indexed view the view needs to be schema bound to the entities that it is a view over.
To make a view schema bound, simply specify simply use
WITH SCHEMABINDINGin the viewCREATE/UPDATEquery, for example:See this link for more information on schema binding, or the MSDN page on the CREATE VIEW statement.
However from what you have said I don’t think the indexed view will necessarily help you – the message “Query processor ran out of Internal resources” means that the query processor failed to produce an execution plan for your query, which I would guess only happens with extremely complex queries.
You should try to reduce the complexity of your query somehow.