Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Indexed Views

Author  Topic 

ramdas
Posting Yak Master

181 Posts

Posted - 2002-09-26 : 15:05:14
Hi,
I read in SQL 2000 BOL that Indexed views can be used in Enterprise or Developer edition. Will the optimizer use the indexes on Views in the developer edition. The reason I ask is most of the users quote only enterprise edition.
Here is an example:
SET NUMERIC_ROUNDABORT OFF
GO
SET ANSI_PADDING,ANSI_WARNINGS,CONCAT_NULL_YIELDS_NULL,ARITHABORT,QUOTED_IDENTIFIER,ANSI_NULLS ON
GO
CREATE VIEW dbo.Predictive_software_view
WITH SCHEMABINDING
AS
SELECT ISQR_ID, Survey_ID, Individuals_ID, Image_ID, Answer_Choice, Question_ID, Survey_Questions_ID, Label, Model_Value, For_Analysis, Weight,
Model_Attribute
FROM dbo.Individual_Survey_Question_Response
WHERE (For_Analysis = 1)

CREATE UNIQUE CLUSTERED INDEX idx_ISQR_ID ON Predictive_software_view(ISQR_ID)
GO
CREATE NONCLUSTERED INDEX idx_answer_survey ON Predictive_software_view(survey_questions_ID,answer_choice)
GO
CREATE NONCLUSTERED INDEX idx_individual_answer_survey ON Predictive_software_view(individuals_ID,survey_questions_ID,answer_choice,ISQR_ID)
GO

Bye
Ramdas

Ramdas Narayanan
SQL Server DBA
   

- Advertisement -