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 Development (2000)
 Optimize query

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-01-08 : 08:52:32
praveen writes "i have written a stored procedure which have to retrieve from n no. of tables and store the data in a table. it is right now taking 15 sec, and this is for one condition and there can be hundred conditions so the processing will be 15*100 secs. how do i reduce the processing time?
i am using cursors also.
pls reply asap"

nr
SQLTeam MVY

12543 Posts

Posted - 2003-01-08 : 09:24:08
Don't use cursors is probably a good start.

You don't give a lot of info here but just make sure you use indexes to get the data.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2003-01-08 : 11:55:16
post the SP (with any confidential material removed/altered)
and sample ddl of the tables used and sample data (and expected results)...in the style of ValterBorges contributution in the link below.

http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=22799



and you will get more help.

Go to Top of Page
   

- Advertisement -