Optimize for Ad hoc Workloads

Vishu 1,576 Reputation points
2021-06-14T03:51:45.593+00:00

Is setting Optimize for Ad hoc Workloads to true for sql 2017/2019 a best practise.

SQL Server | Other
0 comments No comments
{count} votes

Answer accepted by question author
  1. CarrinWu-MSFT 6,891 Reputation points
    2021-06-14T09:16:36.713+00:00

    Hi @Vishu ,

    Welcome to Microsoft Q&A!

    Before you enable Optimize for Ad hoc Workloads, you should test it first. Please refer to this thread, see below:
    105361-2.png

    Best regards,
    Carrin


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Olaf Helper 47,581 Reputation points
    2021-06-14T06:27:12.347+00:00

    Is setting Optimize for Ad hoc Workloads to true for sql 2017/2019 a best practise.

    If it would, then the option would be set to "True" by default; which isn't.
    So it depends on the workload of your SQL Server if you should set it or not.
    See optimize for ad hoc workloads Server Configuration Option for more details

    0 comments No comments

  2. Erland Sommarskog 128.7K Reputation points MVP Volunteer Moderator
    2021-06-14T22:06:20.843+00:00

    Yes, it is generally best practice to turn on this option. The option is kind of band-aid for poorly written applications, but your workload would have to be quite special to suffer from it.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.