Querying Data with TransactSQL Free Practice Test — 30 Questions

30 questions · Full explanations · No account required

Free
Question 1 of 30

A database developer is troubleshooting a slow-performing T-SQL query that aggregates customer order data. The query frequently filters and sorts results by the date an order was placed. The execution plan reveals significant time spent on table scans and inefficient data retrieval. Considering the typical access patterns for order-related data, which indexing strategy on the `Orders` table, specifically targeting the `OrderDate` column, would most effectively address the performance degradation for queries involving date-based filtering and sorting?

Implement a clustered index on the `OrderDate` column of the `Orders` table.
Create a non-clustered index on the `OrderDate` column of the `Orders` table, including `CustomerID` and `OrderID` in the index key.
Establish a unique non-clustered index on the `OrderDate` column of the `Orders` table.
Add a filtered non-clustered index on the `OrderDate` column for orders placed within the last fiscal year.

About the Querying Data with TransactSQL Certification

These free practice questions are designed to help you assess your readiness for the Querying Data with TransactSQL exam by Other. Each question comes with a detailed explanation to reinforce the correct concept. For a complete exam preparation experience with hundreds of questions, spaced-repetition study tools, and full exam simulations, explore our premium access.