70-465 · Question #49
During performance testing, you discover that database INSERT operations against the Inventory table are slow. You need to recommend a solution to reduce the amount of time it takes to complete the…
The correct answer is A. Partition the nonclustered index. When INSERT operations are slow on a table, partitioning the nonclustered index can reduce contention and improve write performance by distributing index maintenance across partitions.
Question
Options
- APartition the nonclustered index.
- BPartition the Inventory table.snapshot replication
- CCreate a column store index.Master Data Services
- DDrop the clustered index.change data capture
How the community answered
(21 responses)- A81% (17)
- B5% (1)
- C5% (1)
- D10% (2)
Why each option
When INSERT operations are slow on a table, partitioning the nonclustered index can reduce contention and improve write performance by distributing index maintenance across partitions.
Partitioning a nonclustered index aligns it with the underlying table's partition scheme, reducing index maintenance overhead during INSERT operations by limiting the scope of page splits and lock contention to individual partitions rather than the entire index structure. This is especially effective when inserts follow a predictable pattern (e.g., date-based), as new rows and their index entries are written only to the relevant partition. The result is significantly reduced I/O and locking during high-volume INSERT workloads.
Partitioning the Inventory table alone without aligning the nonclustered indexes may not resolve INSERT slowness caused by index maintenance overhead, and table partitioning addresses data storage distribution rather than directly optimizing write performance on existing indexes.
Columnstore indexes are optimized for analytical read (OLAP) workloads involving large scans and aggregations; they introduce additional overhead during DML operations like INSERT, making write performance worse rather than better.
Dropping the clustered index would convert the table to a heap, which may speed up some inserts but eliminates the benefits of ordered data retrieval, can worsen read performance significantly, and is generally not a recommended production solution for improving INSERT performance.
Concept tested: Partitioned nonclustered index optimization for INSERT performance
Source: https://learn.microsoft.com/en-us/sql/relational-databases/partitions/partitioned-tables-and-indexes
Topics
Community Discussion
No community discussion yet for this question.