Test disabling nonclustered indexes before a large load, rebuilding them afterward, and measuring total time and log use.
SAMPLED vs DETAILED: Running index_physical_stats Safely
A misspelled table name quietly turns into a scan of everything. Here is the guard, and a fair comparison of the three scan modes on one small index.
Ordering a Maintenance Window: Backups, CHECKDB and Index Work
Order a maintenance window by listing Agent schedules, separating CHECKDB, backups, index work, and statistics, then tracking growth.
A Multi-Tenant Schema With a TenantId Column: Keys, Indexes and Safety
Design a multi-tenant schema with composite keys, tenant-first indexes, trusted session context, and row-level security checks.
Count Rows and Indexes for Every Table in SQL Server
To count rows and indexes for every table, one query on the catalog views answers four questions at once: how many tables, which are heaps, how many nonclustered indexes each has, and how many rows each holds. The post tests it on a demo database and explains where the row count comes from.
SQL SERVER – Identify Numbers of Non Clustered Index on Tables for Entire Database
Here is a script that counts each non clustered index on tables across the entire database, and the small story of why I wrote it.
SARGable Date Filters: Stop Wrapping Columns in Functions
Write SARGable date filters as half-open ranges for years, months, days, and rolling windows, then compare plans and logical reads.







