Skip to content

Instantly share code, notes, and snippets.

@ronascentes
Last active October 28, 2016 13:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ronascentes/d8ace8d82f68d78b8c96a7dffc281639 to your computer and use it in GitHub Desktop.
Save ronascentes/d8ace8d82f68d78b8c96a7dffc281639 to your computer and use it in GitHub Desktop.
Check SQL Server advanced settings
-- show advanced options
-- cost threshold for parallelism
-- max degree of parallelism
-- max server memory (MB)
-- optimize for ad hoc workloads
SELECT name, description, value, value_in_use
FROM sys.configurations
WHERE configuration_id IN (518,1538,1539,1544,1581)
sp_configure 'show advanced options', 1;
GO
sp_configure 'max degree of parallelism', 4;
GO
sp_configure 'cost threshold for parallelism', 50;
GO
sp_configure 'max server memory', 4096;
GO
sp_configure 'optimize for ad hoc workloads', 1
GO
RECONFIGURE WITH OVERRIDE;
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment