Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6213479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:42:14+00:00 2026-05-24T06:42:14+00:00

I have a several very expensive queries which seem to hog resources that seems

  • 0

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.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T06:42:15+00:00Added an answer on May 24, 2026 at 6:42 am

    you could try something like this:

    DECLARE @Busy int
           ,@Ticks int
    SELECT @Busy=@@CPU_BUSY
          ,@Ticks=7777  --<you have to determine this value based on your machine
    WAITFOR DELAY '00:00:10' --10 seconds
    
    WHILE @@CPU_BUSY-@Ticks>@BUSY
    BEGIN
        --too busy, wait longer
        @BUSY=@@CPU_BUSY
        WAITFOR DELAY '00:00:10' --10 seconds
    END
    
    EXEC YourProcedureHere
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several database tables that just contain a single column and very few
I have a SOLR index over several million full text documents. This works very
I have several large code bases which compile into dynamic libraries. I know that
I have several statements which access very large Postgresql tables i.e. with: SELECT a.id
I have several projects with a very large over-lapping code-base. We've just recently started
I have been working very hard on several very long views which are attached
I have several very customized Django ModelAdmins that I would like to add extra
I'm very novice with Linq but I have to convert several complicated SQL queries
We have a very expensive calculation that we'd like to cache. So we do
We have a java system that is implemented in several layers. On the lowest

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.