Is there a way to set the MAXDOP to 1 when I run a query and set it back to 0 after the query is done?I see too many CXPacket waits on my database.
I do not want to use something like
EXEC sp_configure 'max degree of parallelism',1
RECONFIGURE WITH OVERRIDE
which will change setting for all whole server.