Acmeware Achieves 100% Submission Success
Featured article
Acmeware completes 100% successful submissions for eCQM, PQRS, Hospital IQR, and Joint Commission ORYX using OneView for acute and ambulatory settings.
Nonclustered indexes are optional structures that can dramatically improve query performance in Data Repository when applied to the right columns.
Article content
Indexes in a SQL Server database are structures that speed up data access from tables and views. Two index types exist: clustered and nonclustered. Since each table permits only one clustered index via its primary key, developers and analysts leverage nonclustered indexes as optional performance enhancers.
Nonclustered indexes excel when column values show high uniqueness. AdmissionDateTime offers over 31.5 million possible values within a single year, making it an excellent candidate. Conversely, Gender fields with merely three values (M, F, U) demonstrate poor index candidates, as adding an index here would provide very little benefit.
Creating indexes modifies table design. Two critical practices to keep in mind:
The fundamental answer: slower-than-acceptable data retrieval. Consider:

Five primary guidelines:
Complex scenarios require specialized techniques.
Included Columns: Nonclustered indexes support optional non-key columns as "included" values. An index with included non-key columns can significantly improve query performance because the query optimizer can locate all the column values within the index. This enables "Index Only Scan" operations avoiding table access.

Filtered Indexes: These boost performance in very specific circumstances where a value is used in a predicate frequently, but that value is only a small amount of the total values for that table. For example, with AdmVisitEvents or RegEvent_Events, by adding a filter on the Status column where it only matches a specific value, we limit the scope of the index, making it more efficient.
There is no one size fits all solution for these advanced index examples. Balance improved query performance and the overhead and maintenance indexes require. Dramatic runtime improvements, say from five minutes to 30 seconds, justify index creation. Marginal gains requiring extensive testing may not warrant implementation overhead.