Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7829217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T10:41:10+00:00 2026-06-02T10:41:10+00:00

What reasons would you NOT choose to enable forced parameterization over simple parameterization for

  • 0

What reasons would you NOT choose to enable forced parameterization over simple parameterization for ad-hoc queries in SQL Server?

Is there a performance overhead? If so would it not be offset by the (possible) gains made by re-used query plans?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T10:41:11+00:00Added an answer on June 2, 2026 at 10:41 am

    Have you analyzed your plan cache to see if you have a high number of single-use plans?

    SELECT usecounts, COUNT(*), SUM(size_in_bytes) 
      FROM sys.dm_exec_cached_plans
      GROUP BY usecounts
      ORDER BY usecounts;
    

    Have you considered the ‘optimize for ad hoc workloads‘ setting, which at least only stores a stub for the plan until it has been used more than once? I’ve found this to be quite effective.

    If you have a lot of ad hoc SQL and you are seeing plan cache bloat, it can’t hurt to try forced parameterization. But you should thoroughly test your entire workload, since there are cases where the overhead can outweigh the gains (in particular if you make heavy use of indexed views, persisted computed columns, or partitioning you may end up with worse plans). It is important to note that when you turn this setting on, it also runs a DBCC FREEPROCCACHE for you, so expect a little hiccup where all of your existing plans will need to be re-compiled the next time they are needed. (Of course this has far less noticeable impact in the case where you already have ‘optimize for ad hoc’ combined with lots of single-use plans, since you’re mostly evicting stubs that would probably get flushed before re-used anyway.)

    Also note that there are many cases where this setting has no effect on individual queries (see the Books Online topic).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For reasons that I would not like to discuss, our master database schema is
If I'm running a suite of tests, is there a reason I would NOT
There are many security reasons why one would want to drop an HTTP connection
I know there are LOTS of reasons why you would compose a certain object
Are there any good reasons for why you would include JavaScript like this: <script
For various reasons I would like to not store the connection string for my
We have customers who, for unassailable reasons, cannot use SQL Server's built-in backup features
What are the main reasons someone would use HTML's tbody in a table? Is
I would like to know the reasons that we do refactoring and justify it.
I would like to put some extra merged cells for grouping reasons on the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.