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 garden tools hanging on a rail, the second one a vermilion trowel and the others grey and sage

Parameter Sniffing Fixes Compared: Which One to Use

January 1, 2020
Pinal Dave
SQL Performance
Parameter Sniffing, Query Hint, Recompile, SQL Scripts, SQL Stored Procedure

Parameter sniffing fixes compared on one table show a clear order, from a cheap guess to a better index. This post runs the plain procedure, a local variable, OPTIMIZE FOR UNKNOWN, a scoped setting, OPTION (RECOMPILE) and a covering index on the same skewed table, and prints the page reads of each in both call orders.

Read More
Gouache painting of a fresh pattern sheet pinned on cloth with vermilion scissors beside a pile of crumpled old patterns

OPTION (RECOMPILE) Hint: When a Fresh Plan Pays Off

December 31, 2019
Pinal Dave
SQL Tips and Tricks
Parameter Sniffing, Query Hint, Recompile, SQL Scripts, SQL Stored Procedure

The OPTION (RECOMPILE) hint tells SQL Server to build a new plan every time a statement runs. This post measures the page reads it saves on skewed data, the compile cost it adds, the filtered index it unlocks, and how to apply it to one statement of a procedure.

Read More
Gouache painting of a brass tap with a vermilion wheel feeding a trough that runs past a row of young apple trees

Database Scoped Configuration: Turn Off Parameter Sniffing

December 30, 2019
Pinal Dave
SQL Performance
Parameter Sniffing, SQL Scripts, SQL Server Configuration, SQL Stored Procedure

A database scoped configuration lets you turn off parameter sniffing for one database with a single statement. This post measures a procedure with the setting on and off, shows that the change clears the cached plans of the database, and explains what the switch does not fix.

Read More
Two identical carved wooden knights show an original alongside its faithful duplicate

How to Copy Files in SQL Server? – Interview Question of the Week #257

December 29, 2019
Pinal Dave
SQL Interview Questions and Answers
SQL Command, SQL Scripts, SQL Server, SQL Stored Procedure

Question: How to Copy Files in SQL Server?

Answer: SQL Server 2019 has very interesting features that can make a life of DBA’s and Developers very easy.

Read More
A hand tapping a plaster cast of a carved column top in a workshop, the original column visible outside.

Running DBCC CHECKDB on a Restored Copy Instead of Production

December 28, 2019
Pinal Dave
SQL Tips and Tricks
Database Corruption, DBA, SQL Backup and Restore, SQL Server DBCC

Run CHECKDB on a restored copy to validate a recoverable backup, retain the full check output, and understand what remains untested.

Read More
A pot of rice cooking under a clear glass lid, grains visible through the mist, a spoon resting untouched beside it.

Lightweight Query Profiling: Live Progress Without the Old Overhead

December 27, 2019
Pinal Dave
SQL Performance
Execution Plan, SQL DMV, SQL Monitoring, SQL Server, SQL Server 2019

Use lightweight query profiling to inspect live operator rows and in-flight plans, while avoiding misleading progress percentages.

Read More
A lone railway carriage standing lit at a platform after its engine has uncoupled and left.

GLOBAL_TEMPORARY_TABLE_AUTO_DROP: Keeping ## Tables Alive on Purpose

December 26, 2019
Pinal Dave
SQL Tips and Tricks
SQL Server, SQL Server Configuration, SQL TempDB, Temp Table

Understand GLOBAL_TEMPORARY_TABLE_AUTO_DROP, its version and database scope, explicit cleanup, and the risks of shared global tables.

Read More
Previous 1 … 130 131 132 133 134 135 136 … 844 Next
  • Books
  • Testimonials
  • Privacy Policy

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