What are the requirements for creating an indexed view?

Posted by: Pdfprep Category: 70-761 Tags: , ,

HOTSPOT

Note: This question is part of a series of questions that use the same scenario. For your convenience, the scenario is repeated in each question. Each question presents a different goal and answer choices, but the text of the scenario is exactly the same in each question in this series.

You are developing a database to track customer orders. The database contains the following tables: Sales.Customers, Sales.Orders, and Sales.OrderLines.

The following table describes the columns in Sales.Customers.

The following table describes the columns in Sales.Orders.

The following table describes the columns in Sales.OrderLines.

You need to design an indexed view to return customer information.

What are the requirements for creating an indexed view? Use the drop-down menus to select the answer choice that completes each statement.

Answer:

Explanation:

Box 1: Deterministic The definition of an indexed view must be deterministic. A view is deterministic if all expressions in the select list, as well as the WHERE and GROUP BY clauses, are deterministic.

Box 2: SCHEMABINDING Create the view by using the WITH SCHEMABINDING option.

Box 3: unique clustered The first index created on a view must be a unique clustered index.

References: https://docs.microsoft.com/en-us/sql/relational-databases/views/create-indexed-views

Leave a Reply

Your email address will not be published.