Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to speed up stored procedure

Status
Not open for further replies.

UGrad

Programmer
Oct 15, 2002
40
CA
Hi,
I have a question about how to speed up stored procedure.

If I want to write a SP to process data for 800 people in my database, is it faster to just write one SP to process all 800 people or write several SPs to process parts of 800 people simultaneously.

For example:
1 stored procedure for 800 people
or
2 stored procedures for 400 people each and run them simultaneously.

Also, is there some settings I can change on SQL server to speed up stored procedure??
 
800 records is nothing to SQL Server; people update tables with millions of records. Just don't use a cursor. Read about the insert and update statements in books online.
 
Hi,
I said my procedure will process data for 800 people, not 800 records.

The stored procedure I have now takes about 4.5 hours to process data for 100 people.

Wesley
 
We can't help if we don't know what your procedure is doing. Is it processing 1, 10, 100 or 10,000 records per person? How many tables are used? How many rows in each table? What is the nature of the processing.

A general rule is "poor application design is the chief cause of poor performance." The first thing to analyze is the code. In conjunction with optimizing the code, analyze and optimize indexes.

SQL Server is capable of handling tens of thousands of transactions per per minute. for example, we regularly process payroll records for thousands of employees in a few minutes. If you want to get the best answer for your question read faq183-874 and faq183-3179.
Terry L. Broadbent - DBA
SQL Server Page:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top