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 leaning stack of paper cups beside a tray holding one vermilion mug

Optimize for Ad Hoc Workloads: When to Turn It On

October 20, 2017
Pinal Dave
SQL Performance
Ad Hoc Query, Execution Plan, SQL Cache, SQL Memory

Optimize for Ad Hoc Workloads shrinks the memory that one-time queries take in the plan cache. This post builds a demo of single-use plans, measures their share of the cache, and shows how to read the result. It also covers the cost of the setting and why parameterized queries are the better fix.

Read More
A hand passing a small red bowl of sugar between two facing kitchen windows, house keys left on a hook.

OPENROWSET vs Linked Servers: Querying Another Server Safely

January 13, 2015
Pinal Dave
SQL Tips and Tricks
Ad Hoc Query, Linked Server, SQL Server, SQL Server Security

Compare OPENROWSET and linked servers, inspect login mappings, keep filtering remote, and review authentication and encryption before use.

Read More
Identical crumpet rings fill a griddle with their handles pointing in different directions

Plan Cache Duplicates From Whitespace and Case Differences

April 1, 2013
Pinal Dave
SQL Tips and Tricks
Ad Hoc Query, SQL Cache, SQL Server

One extra space or a lowercase keyword gives you a second cached plan. See it in the cache, and learn what actually fixes it.

Read More
An overcrowded umbrella stand of cheap folding umbrellas squeezing out one worn red umbrella

Finding Single-Use Plans Wasting Memory in the Cache

August 29, 2009
Pinal Dave
SQL Performance
Ad Hoc Query, Execution Plan, SQL Cache, SQL Memory, SQL Server

Find single-use plans, compare their cache memory with the total, and inspect parameterization before discussing server-wide cache settings.

Read More
Small wooden cloakroom tokens sit beside a peg holding one full coat.

Optimize for Ad Hoc Workloads: Shrinking a Bloated Plan Cache

March 21, 2009
Pinal Dave
SQL Performance
Ad Hoc Query, Execution Plan, SQL Cache, SQL Server Configuration

One-off queries can fill your plan cache with plans nobody will reuse. Here is the setting that stores a stub instead, and how to check if you need it.

Read More
Matching enamel chips clipped in pairs, with a similar pair kept apart and linked by a loose thread.

Matching Two Customer Lists When Names and Emails Are Messy

January 8, 2008
Pinal Dave
SQL Tips and Tricks
Ad Hoc Query, Duplicate Records, SQL Joins, SQL String, Temp Table

Clean the text, climb from safe rules to fuzzy ones, and keep one best answer per subscriber. A ladder of joins you can paste into SSMS today.

Read More
Previous 1 2
  • Books
  • Testimonials
  • Privacy Policy

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