Query hint basics start with one idea: a query hint is an instruction you add to one statement in the OPTION clause. This post builds a table of 50,010 tickets, shows a seek for a literal value, a scan for the same value in a variable, and a seek again with OPTIMIZE FOR and with RECOMPILE. It also shows what the hint costs when the value changes. Every number comes from SQL Server 2025.
Hierarchical Query Using a Recursive CTE: Levels, Order and Loops
A hierarchical query using a recursive CTE walks a table that points at itself, one level at a time. This post builds the levels of a small staff table with Lvl + 1, sorts the tree so each person sits under their boss, walks upward from one person and stops a loop in the data. Every result comes from SQL Server 2025.
Securables and Principals in SQL Server: Who Gets Which Permission
Securables and principals are the two nouns of SQL Server security, and a permission joins them. This post gives a user named Tom access to a Finance table, then uses GRANT, DENY and REVOKE and reads the permission list after each step. It ends with one grant on a whole schema. Every result comes from SQL Server 2025.
Columnstore Data Types: What Compresses Well and What Is Blocked
A great compression number means little if the index rejects one column. Here is how to test both questions on your own server.
SQL SERVER – Working with FileTables in SQL Server 2012 – Part 3 – Retrieving Various FileTable Properties
Part 3 of my FileTables series for SQL Server 2012: queries to tell files from folders and find root paths, path locators and relative paths.
Finding the Worst Query in Five Minutes With Query Store
Find the worst query with Query Store totals, compare CPU and duration over the last day, inspect plans, and choose the first tuning target.
Tuning Step One: Capture a Wait Stats Baseline Before Changing Anything
Capture a wait stats baseline, compare two saved snapshots, reject reset intervals, and rank meaningful waits before changing settings.
SQL Server slow? Let's fix it together in about four hours.
In my Comprehensive Database Performance Health Check, you share your screen, I guide you, and we fix your biggest performance troublemakers. No passwords. No remote access.
You keep every script, and the know-how to fix it yourself next time.
Want your whole team to learn it?
My Practical Workshop has no PowerPoint, just live demos. My AI Enablement Workshop shows your team where AI saves hours, and where it quietly costs them.
Over 400 customers have worked with me this way, and not one shared a password. See all consulting options.
Who We Are
Pinal Dave is an SQL Server Performance Tuning Expert and independent consultant with over 24 years of hands-on experience. He holds a Masters of Science degree and numerous database certifications.
Pinal has authored 19 books and 125 Pluralsight courses. To freely share his knowledge and help others build their expertise, Pinal has also written more than 5,800 database tech articles on his blog at https://blog.sqlauthority.com.
Pinal is also a CrossFit Level 1 Trainer (CF-L1) and CrossFit Level 2 Trainer (CF-L2).
Nupur Dave is a social media enthusiast and an independent consultant. She primarily focuses on the database domain, helping clients build short and long-term multi-channel campaigns to drive leads for their sales pipeline.
Shaivi Pinalkumar Dave is a book author and a women’s artistic gymnast.

