Friday, March 23, 2012

Job Performance Vs Running from Query Analyzer

I have a proc that takes 43 seconds to run if I run it from query analyzer.
If I run it from a job it takes 17.5061 minutes.
The job command is EXEC [HYPERe]..[B33HiveMigration].
I cut and paste it into Query Analyzer and whosh. From the job it's a dog.
Are jobs governed. No other variables to consider - on a standalone networ
k using the same box. The proc performs a series of updates, deletes, and i
nserts.
Thank you for your help.Ownership issues? Why did you leave the table owner name blank (you should
always specify dbo if there is only one such table)? If you are dbo you are
going to see different plan, perhaps, than SQL Server agent (remember that
SQL Server Agent jobs do not execute in the same context as you are
currently logged in to Query Analyzer).
http://www.aspfaq.com/
(Reverse address to reply.)
"Mark - HYPERe" <Mark - HYPERe@.discussions.microsoft.com> wrote in message
news:DC69C3BE-3F01-4C92-B164-ADF680FB5220@.microsoft.com...
> I have a proc that takes 43 seconds to run if I run it from query
analyzer. If I run it from a job it takes 17.5061 minutes.
> The job command is EXEC [HYPERe]..[B33HiveMigration].
> I cut and paste it into Query Analyzer and whosh. From the job it's a
dog. Are jobs governed. No other variables to consider - on a standalone
network using the same box. The proc performs a series of updates, deletes,
and inserts.
> Thank you for your help.|||Make sure you have SET NOCOUNT ON in your proc and check out MSKB 249730 to
see if it applies:
http://support.microsoft.com/defaul...730&Product=sql
Hope this helps.
Dan Guzman
SQL Server MVP
"Mark - HYPERe" <Mark - HYPERe@.discussions.microsoft.com> wrote in message
news:DC69C3BE-3F01-4C92-B164-ADF680FB5220@.microsoft.com...
> I have a proc that takes 43 seconds to run if I run it from query
analyzer. If I run it from a job it takes 17.5061 minutes.
> The job command is EXEC [HYPERe]..[B33HiveMigration].
> I cut and paste it into Query Analyzer and whosh. From the job it's a
dog. Are jobs governed. No other variables to consider - on a standalone
network using the same box. The proc performs a series of updates, deletes,
and inserts.
> Thank you for your help.|||Thanks - that worked. Cheers to you. Sorry about the multiple posts. I wa
s getting error messages when posting.
"Dan Guzman" wrote:

> Make sure you have SET NOCOUNT ON in your proc and check out MSKB 249730 t
o
> see if it applies:
> http://support.microsoft.com/defaul...730&Product=sql
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Mark - HYPERe" <Mark - HYPERe@.discussions.microsoft.com> wrote in message
> news:DC69C3BE-3F01-4C92-B164-ADF680FB5220@.microsoft.com...
> analyzer. If I run it from a job it takes 17.5061 minutes.
> dog. Are jobs governed. No other variables to consider - on a standalone
> network using the same box. The proc performs a series of updates, delete
s,
> and inserts.
>
>|||> Thanks - that worked. Cheers to you. Sorry about the multiple posts. I
was getting error messages when posting.
http://www.aspfaq.com/5007

No comments:

Post a Comment