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 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
Matched drawer components await fitting beside preserved original materials.

SQL SERVER – Attach a Database with T-SQL

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

To attach a Database with T-SQL, I use CREATE DATABASE … FOR ATTACH. A customer asked about attaching existing data and log files.

Read More
Gouache painting of a muffin tin holding one seashell in each cup with one vermilion shell

Capture sp_who2 Output Into a Table With INSERT EXEC

December 17, 2020
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Monitoring, SQL Scripts, SQL Server, Temp Table

To capture sp_who2 output, create a table with matching columns and fill it with INSERT EXEC. This post builds the table, captures the session list three times with a time stamp, and shows the two errors that stop the method.

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

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