exam questions

Exam 70-762 All Questions

View all questions & answers for the 70-762 exam

Exam 70-762 topic 1 question 138 discussion

Actual exam question from Microsoft's 70-762
Question #: 138
Topic #: 1
[All 70-762 Questions]

Note: This question is part of a series of questions that use the same or similar answer choices. As answer choice may be correct for more than one question in the series. Each question is independent of the other questions in this series.
Information and details provided in a question apply only to that question.
You have a Microsoft SQL Server database named DB1 that contains the following tables:

Users frequently run the following query:

Users report that the query takes a long time to return results.
You need to minimize the amount of time requires for the query to return data.
What should you do?

  • A. Create clustered indexes on TBL1 and TBL2.
  • B. Create a clustered index on TBL1.Create a nonclustered index on TBL2 and add the most frequently queried column as included columns.
  • C. Create a nonclustered index on TBL2 only.
  • D. Create UNIQUE constraints on both TBL1 and TBL2. Create a partitioned view that combines columns from TBL1 and TBL2.
  • E. Drop existing indexes on TBL1 and then create a clustered columnstore index. Create a nonclustered columnstore index on TBL1.Create a nonclustered index on TBL2.
  • F. Drop existing indexes on TBL1 and then create a clustered columnstore index. Create a nonclustered columnstore index on TBL1.Make no changes to TBL2.
  • G. Create CHECK constraints on both TBL1 and TBL2. Create a partitioned view that combines columns from TBL1 and TBL2.
  • H. Create an indexed view that combines columns from TBL1 and TBL2.
Show Suggested Answer Hide Answer
Suggested Answer: H 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
MML
Highly Voted 4 years, 11 months ago
H is correct
upvoted 9 times
...
Alex5x
Most Recent 4 years, 8 months ago
H is correct only if column3, 4 and 5 are not nullable. From Microsoft (https://docs.microsoft.com/en-us/sql/relational-databases/views/create-indexed-views?view=sql-server-ver15) The SELECT statement in the view definition must not contain the following Transact-SQL element: SUM function that references a nullable expression. Unfortunately, the question says nothing about nullability of those columns.
upvoted 2 times
...
iYoung
5 years, 2 months ago
Since the query already selects from the tables, how is it supposed to be a view?
upvoted 1 times
Nickname17
5 years, 2 months ago
Query view
upvoted 1 times
...
foqa
5 years, 1 month ago
Optimizer will figure out that indexed view contains the data and will query the view instead of tables.
upvoted 4 times
Barbedx
4 years, 5 months ago
agree with foqa
upvoted 1 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...