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 an empty rain gauge on a fence post at dawn, with heavy rain clouds approaching and a small vermilion flag on the post.

Estimated Plan With a Temp Table: Why It Guesses One Row

November 7, 2019
Pinal Dave
SQL Performance
Execution Plan, SQL Scripts, SQL Server Management Studio, Temp Table

An estimated plan for code that fills a temp table guesses one row for every read of that table. This post compares the estimated plan and the actual plan on SQL Server 2025, shows where the numbers split, and explains when to trust each one.

Read More
Gouache painting of seedling trays on a greenhouse bench, grouped by wooden dividers and ordered smallest to tallest, with one vermilion divider.

Sequence Project and Segment: How Window Functions Show Up in a Plan

November 6, 2019
Pinal Dave
SQL Performance
Execution Plan, SQL Index, SQL Performance, SQL Scripts

A window function leaves Segment and Sequence Project operators in a query plan, and a Sort in front of them. This post tests ROW_NUMBER and a running total on SQL Server 2025, shows the batch mode Window Aggregate that replaces them, and removes the Sort with an index.

Read More
Gouache painting of a conveyor belt where most wooden crates slide into a return chute and only two continue, one of them vermilion.

The Filter Operator: When SQL Server Reads Everything and Keeps a Few Rows

November 5, 2019
Pinal Dave
SQL Performance
Execution Plan, SQL Index, SQL Performance, SQL Scripts

The Filter operator keeps a few rows after the plan has read and sorted many more. This post shows one on SQL Server 2025 with the actual plan and the logical reads, then rewrites the query so it seeks instead and reads about a fifth as many pages.

Read More
Two pantry shelves, small tins boxed wastefully on one and packed snugly on the other.

UTF-8 Collations in SQL Server 2019: When They Save Space

November 4, 2019
Pinal Dave
SQL Tips and Tricks
SQL Collation, SQL Data Storage, SQL Server, SQL Server 2019, Unicode

Compare UTF-8 collations with NVARCHAR storage for English, European, and Asian text before converting indexes or clients.

Read More
Gouache painting of a small wildlife camera strapped to a birch tree, aimed at one narrow forest path, with a vermilion cord running to a stake.

Capture Query Plans With Extended Events: A Safe, Scoped Session

November 4, 2019
Pinal Dave
SQL Performance
Execution Plan, SQL Extended Events, SQL Performance, SQL Scripts

To capture query plans without guessing, use an Extended Events session scoped to one database and a duration threshold. This post builds one on SQL Server 2025, reads the captured actual plan, and measures why plan capture must be switched on briefly and then off.

Read More
A short bridge lets a marble bypass a longer winding wooden track

How to Use GOTO command in SQL Server? – Interview Question of the Week #249

November 3, 2019
Pinal Dave
SQL Interview Questions and Answers
SQL Scripts, SQL Server, SQL Stored Procedure

Question: How to Use GOTO command in SQL Server?

Answer: Let us see a simple example of how GOTO works in SQL Server in this blog post.

Read More
Gouache painting of a hedge maze with a long winding path and a quick exit through a vermilion arch

RETURN Statement in a Stored Procedure: Exit Early

November 2, 2019
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Stored Procedure, SQL Transactions

The RETURN statement ends a stored procedure at once and hands back one integer status code. This post builds a small demo, shows how to read the code, stops a procedure after a chosen step, and tests what RETURN does with NULL, text, open transactions and errors.

Read More
Previous 1 … 138 139 140 141 142 143 144 … 844 Next
  • Books
  • Testimonials
  • Privacy Policy

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