Which Transact-SQL statement should you run?

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

You have a table that has grown in the past six months.

A user reports that queries against the table take a long time to complete.

You need to update the statistics for the table in the least amount of time without disabling automatic statistics updates.

Which Transact-SQL statement should you run?
A . UPDATE STATISTICS WITH RESAMPLE
B . UPDATE STATISTICS WITH FULLSCAN
C . UPDATE STATISTICS WITH SAMPLE 10 PERCENT
D . UPDATE STATISTICS WITH NORECOMPUTE

Answer: C

Explanation:

SAMPLE number { PERCENT | ROWS } specifies the approximate percentage or number of rows in the table or indexed view for the query optimizer to use when it updates statistics.

References:

https://docs.microsoft.com/en-us/sql/t-sql/statements/update-statistics-transact­sql?view=sql-server-2017

Leave a Reply

Your email address will not be published.