SQL Server process priority?

  • I have a query that I need to run that I know is going to take a long time.  I start it running, and the webserver pulling data dies.  Well, it doesn't die, but pulling data from the DB takes so long, the ASP scripts time out.  So to the user, it dies.

    The query I'm running is doing aggregates on a two columns in a table that has 3000000+ rows.  The point of my post is to ask if there's anyway to set the priority of the process executing the query so that it will run in the "background"?  I really don't care if it takes 30 minutes to an hour or more in total, but I need to get the sums across all the columns somehow.  There's no off-peak time window for this system, really, so I can't schedule it to run when people aren't using it. Maybe there some other options that have a similar affect someone can help me with? 

    I'm using Query Analyzer to execute the query, and the server is SQL 2k SP3.

    Thanks. 

  • Actually, nevermind.  I can take the backup and restore to another instance of SQL 2k (MSDE, actually) and run the query there.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply