I have a several very expensive queries which seem to hog resources that seems to put the system over the top.
Is there a delay function I can call to wait until processor resources come back down in SQL Server 2000 – 2008?
My eventual goal is to go back and make these more efficient, use a sproc, but in the meantime I need to get these to work asap because I’m rewriting legacy code.
you could try something like this:
to determine the @Ticks value, just write a loop to print out the difference between @@CPU_BUSY values every 10 seconds. When the system is at your low load, use this value as @Ticks.