This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
SQL SERVER - Performance: OR vs IN

SQL SERVER – Performance: OR vs IN

September 11, 2023
Pinal Dave
SQL Performance
Execution Plan, SQL Server Management Studio, SQL Statistics

I recently asked on Twitter an exciting question about OR vs IN. While I got lots of good answers, there were an equal amount of wrong answers.

Read More
staitistics

SQL SERVER – The Comprehensive Guide to STATISTICS_NORECOMPUTE

September 8, 2023
Pinal Dave
SQL Performance
SQL Index, SQL Statistics

One such feature that plays a pivotal role in managing your SQL Server databases’ performance is the STATISTICS_NORECOMPUTE option.

Read More
Gouache painting of a long pegboard on a table with pliers, a saw, two vermilion-handled hammers, one set crosswise out of line

Performance Tuning Mistakes in SQL Server: 11 Habits to Fix

February 1, 2023
Pinal Dave
SQL Performance
Best Practices, SQL Backup and Restore, SQL Cursor, SQL Index, SQL Statistics

Performance tuning mistakes are habits, and each one has a check. Eleven sit in one table, and five are measured on a demo database: a missing index, stale statistics, a row by row loop, a giant delete and a type that cannot be indexed.

Read More
Matching workpieces are compared around a new fitted guide and its maintenance tools.

SQL SERVER – Measure Index Performance

October 27, 2021
Pinal Dave
SQL Performance
Clustered Index, SQL Index, SQL Server, SQL Statistics

I measure index performance against the same workload before and after a change. A customer wanted to assess a new index.

Read More
A whole assembly is inspected separately from its three internal component workpieces.

SQL SERVER – Stored Procedure Timing and Cached Measurements

August 11, 2021
Pinal Dave
SQL Performance
Execution Plan, SQL Server Management Studio, SQL Statistics, SQL Stored Procedure

SET STATISTICS TIME reports CPU and elapsed execution time for Stored Procedures. A customer wanted to measure a run without adding statements manually.

Read More
A grain sampling spear holding a small sample beside a full grain sack

rows_sampled: Checking How Much Data Your Statistics Saw

April 23, 2021
Pinal Dave
SQL Performance
Data Warehousing, Master Data Services, SQL Data Storage, SQL Statistics

A fresh statistic can still come from a small sample. Compare rows with rows_sampled and see how a sample misjudges a rare value.

Read More
Gouache painting of a full wooden spool rack with one vermilion spool left over on the table

Maximum Columns in an Index: 32 Keys and the Way Around

March 22, 2021
Pinal Dave
SQL Tips and Tricks
SQL Column, SQL Index, SQL Scripts, SQL Statistics

The maximum columns in an index is 32 key columns, and a second limit on key size can stop an index earlier. This post builds a 40 column table, shows the error for a 33rd key column, and adds included columns to get around it. It also shows the 900 and 1,700 byte key limits and tests statistics on 33 and 40 columns.

Read More
Previous 1 2 3 4 5 … 16 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com