Jeff Iannucci takes us through power settings within T-SQL:
Well, not exactly, but it’s definitely like that. The default Power Setting is “Balanced” which means during periods of lower activity the clock speeds of your CPUs are reduced to conserve power and save your battery.
Apparently all Windows installations think they are on laptops. SPOILER ALERT: your database servers are probably not laptops.
Jeff has a T-SQL script to fix this. Unfortunately, it won’t fix the other power-based performance killer: power settings in BIOS.