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
Mar25

Adaptive Threshold Rows: How an Adaptive Join Chooses

Pinal Dave
SQL Performance
Execution Plan, SQL Joins, SQL Scripts, SQL Server
2 Comments

Adaptive threshold rows is the row count at which an adaptive join switches from nested loops to a hash join. This post runs two queries on WideWorldImporters, reads each threshold from the cached plan, and shows which branch ran. The first query stays below its threshold and the second goes above it.

Continue Reading
Mar24

Table or View in SQL Server: Check With OBJECTPROPERTY

Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Table Operation, SQL View, System Object
1 Comment

To settle table or view in SQL Server, ask OBJECTPROPERTY. This post builds a table, a view, a synonym and a procedure, and reads the answers for each. It also shows a trap with other databases and a catalog query for every object.

Continue Reading
Mar23

Find Expensive Queries – SQL in Sixty Seconds #159

Pinal Dave
SQL Video
SQL CPU, SQL in Sixty Seconds, SQL Memory, SQL Scripts, SQL Server
No Comments

Earlier I wrote a blog post about SQL SERVER – List Expensive Queries – Updated March 2021. Let us learn how to Find Expensive Queries.

Continue Reading
Mar22

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

Pinal Dave
SQL Tips and Tricks
SQL Column, SQL Index, SQL Scripts, SQL Statistics
1 Comment

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.

Continue Reading
Mar19

CHECKPOINT Covers One Database: Flush Data to Disk

Pinal Dave
SQL Performance
Disk, SQL Memory, SQL Scripts, SQL Server
No Comments

CHECKPOINT covers one database, so to flush data to disk you run it in each database. A demo with two databases shows one flushed and one still dirty. A short script then flushes every database in one pass, and the post says when a flush is worth it.

Continue Reading
Mar18

Auditing Query Hints Left in Production Code

Pinal Dave
SQL Performance
Execution Plan, Query Hint, Query Store, SQL Server
No Comments

Start auditing query hints in modules and Query Store, rank the busiest statements, and test removal with measured plans and rollback.

Continue Reading
Mar17

Expensive Queries by query_hash: Total Cost, Not One Plan

Pinal Dave
SQL Performance
SQL CPU, SQL Memory, SQL Scripts, SQL Server
3 Comments

Expensive queries by query_hash are ranked by total cost, not by single plans. A demo runs one lookup with 40 different literals and shows that the top single plan is a scan, while the grouped total, ranked by reads, points at the lookup. The query ranks by reads, CPU, time or runs.

Continue Reading
Previous 1 … 74 75 76 77 78 79 80 … 846 Next

SQL Server slow? Let's fix it together in about four hours.

Pinal Dave

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.

  • Books
  • Testimonials
  • Privacy Policy

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