Indexes and Performance Tuning
⚡ Indexes and Performance Tuning
Indexes improve query speed by reducing data scans.
| Type | Description |
|--------------|--------------------------------------------------|
| Clustered | Sorts and stores rows in table order |
| Non-Clustered| Separate from table; contains pointers to data |
| Full-Text | Supports advanced search on text fields |
| Columnstore | Optimized for large, analytical workloads |
-- Create a non-clustered index
CREATE INDEX idx_Author ON Books(Author);
🧠 Tip: Use SQL Server Profiler and Database Engine Tuning Advisor for analyzing performance bottlenecks.