What should you do?

You are responsible for maintaining a SQL Server 2005 database. Business analysts in the company routinely use a view named v_CustomerSales to join the Customers and Sales tables in the database. They use the view to aggregate total sales by customer by month.
You need to increase the performance of the view. What should you do?

You are responsible for maintaining a SQL Server 2005 database. Business analysts in the company routinely use a view named v_CustomerSales to join the Customers and Sales tables in the database. They use the view to aggregate total sales by customer by month.
You need to increase the performance of the view. What should you do?

A.
Update the view to use an outer join between the Customers and Sales tables.

B.
Create a clustered index on the v_CustomerSales view.

C.
Create two separate views that do not contain any joinsone view named v_Customers for the Customers table and another one named v_Sales for the Sales table.

D.
Create a stored procedure for the business analysts that uses the v_CustomerSales view.

Explanation:
As a view is nothing more than a virtual table containing data from one or more tables you have the option to create a clustered index on the view in order to obtain an indexed view and obtain performance benefits.



Leave a Reply 0

Your email address will not be published. Required fields are marked *