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 row of grey-blue birds on a wire with two vermilion birds among them above a quiet village road

Parameters of sp_who2: Active, Session ID and the Login Trap

December 29, 2020
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Monitoring, SQL Scripts, SQL Server

The parameters of sp_who2 are one optional value that can be a session ID, the word active or a login name. This post counts the rows each form returns, shows that the login form does not filter, and explains the errors.

Read More
Gouache painting of a football goal far across a lawn with a vermilion ball sitting much nearer

Disable Row Goal in SQL Server: When the Hint Helps and When It Hurts

December 28, 2020
Pinal Dave
SQL Performance
Execution Plan, Query Hint, SQL Scripts, SQL Server

To disable row goal for one query, add the DISABLE_OPTIMIZER_ROWGOAL hint to it. This post builds a table where the row goal chooses a bad plan, shows the reads with and without the hint, and then shows a table where the row goal wins.

Read More
Gouache painting of a wooden sieve beside a grey pail on a beach, with a heap of shells and one vermilion shell in the sieve

Number of Rows Read in an Execution Plan: What It Tells You

December 25, 2020
Pinal Dave
SQL Performance
Clustered Index, Execution Plan, SQL Index, SQL Server Management Studio

The number of rows read shows how many rows a scan or seek touched, and it can be far larger than the rows it returned. This post builds a demo table, compares a scan with two seeks, and explains why a seek can still read too many rows.

Read More
Gouache painting of three wheelbarrows queuing at a narrow gap in a stone wall, the one in the gap vermilion

DBREINDEX and MAXDOP: Use ALTER INDEX to Limit Parallelism

December 24, 2020
Pinal Dave
SQL Tips and Tricks
MAXDOP, Parallel, SQL Index, SQL Server DBCC

DBREINDEX and MAXDOP do not combine: DBCC DBREINDEX has no MAXDOP option, so it follows the server setting. This post shows the three errors, rebuilds a demo index with ALTER INDEX at different MAXDOP values, and measures the degree of parallelism each one used.

Read More
Gouache painting of a tightly packed shelf of jars above a shelf with spaced jars and one vermilion jar

Instance Level Fill Factor or Index Level: What to Set

December 23, 2020
Pinal Dave
SQL Performance
SQL Data Storage, SQL Index, SQL Server Configuration

An instance level fill factor is a default for every index that sets none, and an index level setting wins. This post reads the setting, measures what each fill factor costs in pages and saves in page splits, and gives a plan for choosing the level.

Read More
all sessions

List All Sessions – SQL in Sixty Seconds #148

December 22, 2020
Pinal Dave
SQL Video
SQL Activity Monitor, SQL in Sixty Seconds, SQL Scripts, SQL Server

One of the most frequent questions which I receive from my client is about activity going inside SQL Server and how to list all sessions.

Read More
Gouache painting of a light wooden cart attached to a small tractor by a vermilion coupling pin

Attach an In-Memory Database With T-SQL: Include the Container

December 21, 2020
Pinal Dave
SQL Tips and Tricks
In-Memory OLTP, SQL Backup and Restore, SQL Scripts, SQL Server

To attach an In-Memory database with T-SQL, use CREATE DATABASE with FOR ATTACH and list the data file, the log file and, when it moved, the container folder. This post builds a demo database, detaches it and attaches it twice. It also shows which rows survive.

Read More
Previous 1 … 80 81 82 83 84 85 86 … 844 Next
  • Books
  • Testimonials
  • Privacy Policy

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