Which Transact-SQL statement should you run?

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

You administer a Microsoft SQL Server database named Orders. Orders is highly active OLTP system used for e-commerce.

Performance on the database has degraded over the past few months as the volume of data has increased, and now users report the application is unusable.

You need to identify the cause of the performance problem.

Which Transact-SQL statement should you run?
A . SET STATISTICS TIME ON
B . SET FORCEPLAN ON
C . SET STATISTICS IO ON
D . DBCC CHECKCONTRAINTS

Answer: B

Explanation:

When FORCEPLAN is set to ON, the SQL Server query optimizer processes a join in the same order as the tables appear in the FROM clause of a query. In addition, setting FORCEPLAN to ON forces the use of a nested loop join unless other types of joins are required to construct a plan for the query, or they are requested with join hints or query hints.

Leave a Reply

Your email address will not be published.