Learn 9 best practices for writing faster SQL queries, including retrieving only the columns you need, using CASE instead of UPDATE for conditional column updates, and pre-staging data for improved performance.
Table of contents
Retrieve only the columns you needUse CASE instead of UPDATE for conditional column updatesKeep large-table queries to a minimumPre-stage your dataPerform deletes and updates in batchesUse temp tables to improve cursor performanceUse table-valued functions over scalar functionsUse partitioning to avoid large data movesUse stored procedures for performance, use ORMs for convenience1 Comment
Sort: