exam questions

Exam 70-764 All Questions

View all questions & answers for the 70-764 exam

Exam 70-764 topic 2 question 6 discussion

Actual exam question from Microsoft's 70-764
Question #: 6
Topic #: 2
[All 70-764 Questions]

You maintain a database named DB1 that has a nonpartitioned table. You create an index in the table. Automatic statistic updates are disabled.
Uses report that some Microsoft SQL Server Reporting Service (SSRS) queries take long time to run. You determine that the issue is caused by stale statistics for
Index1.
You need to update the statistics for the index.
What should you do?

  • A. Set the value of the Database Read-Only property to True.
  • B. Run the system stored procedure sp_updatestats.
  • C. Set the value of the Auto Create Incremental Statistics property to True.
  • D. Run the UPDATE STATISTICS command with the COLUMNS option.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️
UPDATE STATISTICS updates query optimization statistics on a table or indexed view.
The ALL | COLUMNS | INDEX options update all existing statistics, statistics created on one or more columns, or statistics created for indexes. If none of the options are specified, the UPDATE STATISTICS statement updates all statistics on the table or indexed view.
Note: You can update query optimization statistics on a table or indexed view in SQL Server by using SQL Server Management Studio or Transact-SQL. By default, the query optimizer already updates statistics as necessary to improve the query plan; in some cases you can improve query performance by using
UPDATE STATISTICS or the stored procedure sp_updatestats to update statistics more frequently than the default updates.
References:
https://docs.microsoft.com/en-us/sql/t-sql/statements/update-statistics-transact-sql?view=sql-server-2017

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
Slava_bcd81
4 years, 9 months ago
B is correct
upvoted 1 times
Cococo
4 years, 8 months ago
without parameters, it will only show you the current state...
upvoted 1 times
Cococo
4 years, 7 months ago
sorry, my bad, this SP will update stats for the whole DB and we need just one table
upvoted 1 times
...
...
...
jolsca
4 years, 9 months ago
It can also be done with Reorganize the index.
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 ...