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 four wheelbarrows of apples in an orchard with the fullest one in vermilion

Rows Read Per Thread: Four Ways to See Them in SQL Server

July 26, 2019
Pinal Dave
SQL Tips and Tricks
Execution Plan, Parallel, SQL DMV, SQL Scripts

Rows read per thread show whether a parallel query shares its work evenly. The post shows two plan based methods, a T-SQL query over the last actual plan, and a live DMV for running queries. A 500,000 row demo proves the threads add up to the table.

Read More
Gouache painting of a wall of cubbyholes each holding one boot and a vermilion boot waiting at an occupied cubby

Unique Index Performance: What a UNIQUE Index Saves

July 24, 2019
Pinal Dave
SQL Performance
Execution Plan, SQL Index, SQL Performance, SQL Scripts

Unique index performance gains come from what the optimizer learns, not from smaller pages. A tested demo compares pages, reads, plans and CPU for a plain index and a unique index. It also shows the error a duplicate causes.

Read More
Gouache painting of a small drawer cabinet on a sewing table with a vermilion thread spool inside one open drawer

Temp Table Scope in Dynamic SQL: Who Can See What

July 22, 2019
Pinal Dave
SQL Tips and Tricks
Dynamic SQL, SQL Scripts, SQL TempDB, Temp Table

Temp table scope decides what dynamic SQL and stored procedures can read. Tested demos show a child reading a parent table, a procedure that fails without it, a dynamic table shape and the error a typo causes. A card lists the rules.

Read More
Gouache painting of a long vermilion fruit bowl in a market aisle with small private baskets under the counter

Dynamic SQL Temp Table: Why It Disappears and How to Keep It

July 20, 2019
Pinal Dave
SQL Tips and Tricks
Dynamic SQL, SQL Scripts, SQL TempDB, Temp Table

A dynamic SQL temp table is dropped when its dynamic batch ends, so the main code cannot read it. A global temp table keeps the data, and a per session name keeps it safe. Every step is tested, including the second session clash.

Read More
Gouache painting of a picket fence in a meadow with one vermilion picket leaning the opposite way

SQL Agent Job Backslash Puzzle: Why Both Rows Were Deleted

July 18, 2019
Pinal Dave
SQL Puzzle
SQL Delete, SQL Scripts, SQL Server Agent

A SQL Agent job backslash at the end of a comment line can turn a one row delete into a delete of the whole table. This puzzle sets up the job, explains the cause and tests the effect in T-SQL. It ends with a safe way to write the step.

Read More
Gouache painting of a garden tap with a vermilion wheel feeding a pinched hose into a wooden trough

Disable Resource Governor: Why RECONFIGURE Turns It On

July 17, 2019
Pinal Dave
SQL Tips and Tricks
Resource Governor, SQL Memory, SQL Scripts, SQL Server

To disable Resource Governor, run ALTER RESOURCE GOVERNOR DISABLE. The post shows why RECONFIGURE enables the feature, with a tested script that restores the state it finds. It also explains how saved pool limits come back to life.

Read More
Illustrated cover: Swap Without a Temp

SQL SERVER – Swap Column Values In Table

July 16, 2019
Pinal Dave
SQL Tips and Tricks
SQL Column, SQL Scripts, SQL Server

Here is a question asked to me during Comprehensive Database Performance Health Check. The question was about how to swap column values in a table.

Read More
Previous 1 … 68 69 70 71 72 73 74 … 365 Next
  • Books
  • Testimonials
  • Privacy Policy

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