PrepAway - Latest Free Exam Questions & Answers

What should you do to provide maximum query performance?

You work as a database administrator at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. Domain.com makes use of a database named CK_Sales that is hosted on a database server named Certkiller -DB01.
The table structure for the CK_Sales database is shown in the following exhibit:

Domain.com users report that table scans on the Invoices table causes a slow query. The Invoices table is a large table that is used regularly. You investigate and discover that the query contains the following statement:

SELECT InvoiceID, InvoiceDate FROM Invoices WHERE DateDue = <value>

You need to provide maximum query performance. However, the Invoice table should at all times remain available to users.

What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
In order to accomplish this you should execute the following statement:
USE CK_Sales
GO
CREATE INDEX index1
ON Invoices(DueDate)
INCLUDE(InvoiceID, InvoiceDate)
WITH (ONLINE = ON)
GO

B.
In order to accomplish this you should update all statistics on the Invoices table.

C.
In order to accomplish this you should use the CREATE STATISTICS statement to create the missing statistics on the Invoices.DateDue column.

D.
In order to accomplish this you should execute the following statement:
USE CK_Sales
GO
CREATE INDEX index1
ON Invoices(DueDate, InvoiceID, InvoiceDate)

E.
In order to accomplish this you should set the priority boost server option to 1.

Explanation:
You want to create an index on the columns 1 to 3 in order to have quicker response when querying data in columns 1 and 2 based on a value in column 3.
Syntax
Relational Index
CREATE [UNIQUE] [CLUSTERED | NONCLUSTERED] INDEX index ON object (column [ASC | DESC] [,…n ] )
[INCLUDE (column [ ,…n] ) ]
[WITH (option [ ,…n] ) ]
[ON { partition_scheme ( column ) | filegroup | default } ] [;]


Leave a Reply