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
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
Gouache painting of pairs of large and small cups on a shelf with one small vermilion cup

Case-Sensitive WHERE Clause: COLLATE Without Losing the Seek

March 15, 2021
Pinal Dave
SQL Tips and Tricks
SQL Collation, SQL Scripts, SQL Search, SQL Server, SQL String

A case-sensitive WHERE clause needs a COLLATE on the comparison, but the obvious version scans the index. A demo measures 286 reads against 2, and shows two fixes: keep the plain test beside it, or give the column a case-sensitive collation.

Read More
A magnetic strip above a lathe holding four chisels within reach, a hand lifting the vermilion-handled one.

Memory-Optimized Tables as a Key-Value Cache

March 11, 2021
Pinal Dave
SQL Tips and Tricks
In-Memory OLTP, SQL Cache, SQL Memory, SQL Server

Build a key-value cache with SCHEMA_ONLY memory-optimized tables, native get and set procedures, expiry checks, and bounded cleanup.

Read More
Gouache painting of three snails crawling along a plank with the front one having a vermilion shell

Top Three Wait Stats and What Each One Means

March 10, 2021
Pinal Dave
SQL Tips and Tricks
SQL CPU, SQL Performance, SQL Server, SQL Wait Stats

The top three wait stats in the files people sent in were CXPACKET, SOS_SCHEDULER_YIELD and ASYNC_IO_COMPLETION. A small demo makes each wait happen and measures it with session wait statistics. The post explains what each one means and what to check next.

Read More
Wait Stats for Performance

Wait Stats for Performance – SQL in Sixty Seconds #157

March 9, 2021
Pinal Dave
SQL Tips and Tricks
SQL in Sixty Seconds, SQL Scripts, SQL Server, SQL Wait Stats

I finally decided to create a video on that topic on my SQL in Sixty Seconds Channel. I will create more videos on the topic Wait Stats for Performance.

Read More
Hatpins with repeated colored heads and one bare pin in a fabric cushion

COUNT(*), COUNT(column) and COUNT(DISTINCT): Basics That Trip People

March 5, 2021
Pinal Dave
SQL Tips and Tricks
Computed Column, SQL Column, SQL Server

Why do two counts of the same table disagree? Five tiny demos show NULL, blank text, LEFT JOIN placeholders, bigint and join multiplication.

Read More
Different plowshare shapes arranged beside the distinct furrows they make

Ten Plan Operators Explained: An Operator Cheat Sheet

March 4, 2021
Pinal Dave
SQL Tips and Tricks
Execution Plan, Maintenance Plan, SQL Operator

Seek, scan, lookup, three joins, sort, aggregate, spool and parallelism, each shown with a tiny demo. Learn to judge a plan by rows and executions.

Read More
Previous 1 … 34 35 36 37 38 39 40 … 570 Next
  • Books
  • Testimonials
  • Privacy Policy

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