473,856 Members | 1,555 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Procedure performance in QA vs Sql Agent Job

I am having a problem with a procedure. I can run it from QA and it
takes 50 minutes. When I have it in a scheduled job, it takes 3
hours!! What could be the cause of this? Why the big time
difference?

Thanks
Jul 20 '05 #1
3 1757
Tracey (tr**********@i tsservices.com) writes:
I am having a problem with a procedure. I can run it from QA and it
takes 50 minutes. When I have it in a scheduled job, it takes 3
hours!! What could be the cause of this? Why the big time
difference?


The difference could be due to that Query Analyzer sets some SET options
on, which are not on by default with SQL Agent. Different set of SET
options, gives you a different query plan.

The difference could be due do that the query plans were created for
different input parameters, and therefore were different.

More specifically, it could be that there is an indexed view or an index
on a computed column involved. To use these features, all these
settings must be on: ANSI_NULLS, ANSI_WARNINGS, ANSI_PADDING,
QUOTED_IDENTIFI ER, CONCAT_NULL_YIE LDS_NULL and ARITHABORT. The mostly
likely culprit is ARITHABORT ON. You could try adding a SET ARITHABORT
ON first in the procedure, and see if this improves the execution time
when running from Agent.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2
tr**********@it sservices.com (Tracey) wrote in message news:<b2******* *************** ****@posting.go ogle.com>...
I am having a problem with a procedure. I can run it from QA and it
takes 50 minutes. When I have it in a scheduled job, it takes 3
hours!! What could be the cause of this? Why the big time
difference?

Thanks


Thanks for your suggestions. The time it took for the procedure to
run was still the same. I suppose trying sql profiler might offer
some clues, yes?
Jul 20 '05 #3
Tracey (tr**********@i tsservices.com) writes:
tr**********@it sservices.com (Tracey) wrote in message

news:<b2******* *************** ****@posting.go ogle.com>...
I am having a problem with a procedure. I can run it from QA and it
takes 50 minutes. When I have it in a scheduled job, it takes 3
hours!! What could be the cause of this? Why the big time
difference?

Thanks for your suggestions. The time it took for the procedure to
run was still the same. I suppose trying sql profiler might offer
some clues, yes?


Please, post you reply as a followup to the article you respond to,
rather than you own. This makes it a little easier to reconstruct the
thread.

You could explore more of the options I discussed in my post.

It's a little difficult to give more advice when I have no idea of
the code you are running.

But Profiler could help you to narrow down where the slowdown sets in,
yes.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
13281
by: Raj | last post by:
Hi all, Can anyone help me with a script which would delete files or move them to a different folder at some scheduled time..! Please.....!!! Thanks in advance...
7
14698
by: Lauren Quantrell | last post by:
I have a table with three columns. One of the columns contains text output data nvarchar(500), one of them contains a filename nvarchar(50), one of the columns is a bit to record if it has been output yet bit default value = 0. I am creating a SQL Agent job that needs to look at a recordset of where = 0 and create a seperate text file for each row using as the filename.
12
8356
by: serge | last post by:
I have an SP that is big, huge, 700-800 lines. I am not an expert but I need to figure out every possible way that I can improve the performance speed of this SP. In the next couple of weeks I will work on preparing SQL statements that will create the tables, insert sample record and run the SP. I would hope people will look at my SP and give me any hints on how I can better write the SP.
1
1762
by: tedd_n_alex | last post by:
I have database on SQL Server 2000 set up with a merge publication. This publication is configured with a number of dynamic filters to reduce the amount of data sent to each client. Each client has an anonymous pull subscription. The merge process can be triggered by the windows sync manager and my application. To improve performance I have created some helper tables to hold the mapping between user login and primary keys of selected...
3
6392
by: vj | last post by:
Please let me know how can i handle any kind of error conditions with a single (condition and continue handler). I need to catch any kind of exception thrown in the procedure with a single ( declare condition and a declare continue handler) Thanks in advance. Vijay
8
7593
by: Viator | last post by:
Hi All; I am working on project; where I need to call a DB2 stored procedure (also to be written in the project) which will update/insert some records in the database. The number of rows to be intserted are decide at runtime and there is a constraint that the procedure should be called only once. So the questino is... Can we pass a java array or a Collection using JDBC to DB2? If yes how
1
1652
by: Ed Murphy | last post by:
One of my clients has a stored procedure on their secondary server that copies a bunch of data from the production server. (Replication will break the accounting software, according to its authors. The production server generates a nightly full backup, so if the secondary can be scripted to do a nightly restore from that same file, then that would probably be a Big Win.) Anyway, if I execute the stored procedure from Query Analyzer, it...
9
7675
by: vikram.mankar | last post by:
I have a stored procedure thats transferring/processing data from one table to two different tables. The destination tables have a unique value constraint as the source tables at times has duplicate records and this will prevent the duplicates from being reported. When the stored procedure (which includes a cursor) is executed through query analyzer, it runs fine, and reports an error everytime it sees a duplicate value (as expected). It...
2
4095
by: acw | last post by:
On a SQL Server 2000 db I would like to setup a stored procedure that accesses couple tables and runs the extended stored procedure xp..cmdshell. The goal is to grant users with limited privileges the right to run the stored procedure but not the rights to directly access either the referenced tables or the extended stored procedure. TIA!
0
9921
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9765
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11065
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10700
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10390
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9536
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7934
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4581
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3203
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.