A structured request submitted to SQL Server using Transact-SQL (T-SQL) to retrieve, insert, update, or delete data from one or more database tables or views.
- Query processing pipeline: SQL Server processes queries through parsing, algebrization, optimization (generating an execution plan), and execution. Understanding this pipeline helps DBAs diagnose performance issues.
- Query performance: Performance is influenced by execution plan quality, index design, statistics accuracy, parameter sniffing, and available server resources such as CPU, memory, and I/O.
- Performance monitoring: DBAs use Query Store, Extended Events, and execution plan analysis to identify poorly performing queries, which are among the most common causes of SQL Server performance issues.
-
Query hints:
OPTIONclauses allow DBAs or developers to override the query optimizer’s decisions. They should be used sparingly and only as a last resort, as they can mask underlying performance problems. - Related terms: Execution Plan, Query Store, Index Rebuild, Dynamic SQL, Parallelism.
