Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
| Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 23rd, 2007, 05:27 AM
Authorized User
 
Join Date: Nov 2005
Location: Colombo, , Sri Lanka.
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to speed stored procedure

hi all,
Im making one reporting system using sql server2000 and c# asp.net.I have to make some calculation inside the stored procedur.But it take long time to generate my report. Inside my stored procedur i used cursors and some t-sql functions.
so i want to know are there any method to do fast all calculations inside sp's .
My problem is normally my PC take 40 seconds to generate my report.
If i host this system i think it will take more than 1 mints for generate same report.
Now i indexces all my data filtering tables . But my problem is still same. Can anybody help me to do fast this in sqlserver 2000.
thankx


MSB
__________________
MSB
  #2 (permalink)  
Old October 23rd, 2007, 08:04 AM
Friend of Wrox
 
Join Date: May 2006
Location: Helsingborg, , Sweden.
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Without even seeing your query?


  #3 (permalink)  
Old October 24th, 2007, 09:03 PM
Friend of Wrox
Points: 1,536, Level: 15
Points: 1,536, Level: 15 Points: 1,536, Level: 15 Points: 1,536, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2006
Location: , MI, USA.
Posts: 475
Thanks: 0
Thanked 9 Times in 9 Posts
Default

 
Quote:
quote:Inside my stored procedur i used cursors and some t-sql functions.
Quote:
so i want to know are there any method to do fast all calculations inside sp's .
You've likely identified most of your problems with speed right there... Cursors and functions... Cursors are almost always bad and if the same person who wrote the cursors also wrote the functions... well...

Get rid of the cursors... replace them with correct set based code. Forget about processing rows... process columns as sets.

--Jeff Moden


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stored Procedure muthu555 SQL Server 2000 1 March 5th, 2007 07:13 AM
Stored Procedure rajanikrishna SQL Server 2000 0 July 18th, 2005 05:01 AM
please help me with this stored procedure bebeko SQL Server 2000 1 June 10th, 2005 12:09 PM
Stored Procedure help flyin SQL Server 2000 4 August 3rd, 2004 07:37 AM
Stored Procedure... babloo81 SQL Server 2000 2 May 1st, 2004 11:25 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.