Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Running a script with low priority

Author  Topic 

gkar68
Starting Member

1 Post

Posted - 2007-04-18 : 17:47:59
Hi
I need help and I will appreciate any help.
I am running a script that do calculation on a table 90+ million records
I am running 400 calculation on that table

The script is consuming 10+ hours

I am running that on test/development database
My problem that the same SQL server machine is used for two databases, the development where I run my script on, and the test, where the tester run the application.
Whenever I run the script, it kills the testers

Do you know any way that I run the script in low priority?
Is there a way to set attribute for the script or for the database or for the job to be low priority?

I tried to use windows OS, low priority command.
I am running the script from command line with osql, and submitting the command as the following:
start /low osql .....
that should run any job as low priority.
But it seems it is not working

I really appreciate any help.

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2007-04-18 : 17:53:17
I dont think its possible to set the priority like that. perhaps you can create a job with the script you have and let it run at night?


************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-04-18 : 20:02:07
Perhaps if you posted the script we might be able to optimize it or allow it do the processing in chunks.

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

craig79
Starting Member

33 Posts

Posted - 2007-04-19 : 01:09:09
Hi,

Are u making any use of temp tables in ur calculations???
If not make use of it.Can improve i guess...

Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-04-19 : 04:10:55
You could maybe sprinkle some WAITFOR DELAY statements throughout your script?

Kristen
Go to Top of Page

mcrowley
Aged Yak Warrior

771 Posts

Posted - 2007-04-19 : 10:29:54
If the box is a multi-processor box, you can run the test server on only some of the processors using the "max degree of parallelism" and "affinity mask" configuration parameters.
Go to Top of Page
   

- Advertisement -