You have a SQL database in Microsoft Fabric that contains a table named dbo.Orders,
dbo.Orders has a clustered index, contains three years of data, and is partitioned by a
column named OrderDate by month.
You need to remove all the rows for the oldest month. The solution must minimize the impact on other queries that access the data in dbo.orders.
Solution: Run the following Transact-SQL statement.
DELETE FROM dbo.Orders
WHERE OrderDate < DATEADD(nonth, -36, SYSUTCDATETIME());
Does this meet the goal?
You need to remove all the rows for the oldest month. The solution must minimize the impact on other queries that access the data in dbo.orders.
Solution: Run the following Transact-SQL statement.
DELETE FROM dbo.Orders
WHERE OrderDate < DATEADD(nonth, -36, SYSUTCDATETIME());
Does this meet the goal?
Show answerHide answer
Correct answer: B No
Explanation
ExplanationThis question tests how to remove one month of data from a large partitioned table with the least impact on other queries. A DELETE with a WHERE clause removes rows one at a time, logs every row, and holds locks for the whole operation. On a table with three years of data, this creates heavy log activity and blocking. A partition level operation is the better approach because it affects only the target partition.
✅ B. No
The solution does not meet the goal. A DELETE statement removes rows individually and writes a log entry for each one, which uses large amounts of transaction log space and holds locks that can block other queries on dbo.Orders. It also ignores the monthly partitioning. TRUNCATE TABLE with WITH (PARTITIONS (1)) removes the oldest month with far less logging and locking.
❌ A. Yes
Choosing Yes assumes that a filtered DELETE is an efficient way to clear the oldest month. It is not, because it scans and removes each row, generates heavy transaction logging, and can escalate locks, which slows or blocks other queries reading the table. The table is partitioned by month, so a partition level truncate is the correct way to minimize the impact.
🔧 Reference
🔗 TRUNCATE TABLE (Transact-SQL) – Microsoft Learn → confirms that TRUNCATE TABLE can remove all rows from specified partitions using WITH PARTITIONS, and uses fewer log and system resources than DELETE, which logs every row it removes.

