You are here: Re: NEED TO GO FASTER « MsSQL Server « IT news, forums, messages
Re: NEED TO GO FASTER

Posted by Erland Sommarskog on 06/18/07 22:34

Uncle Rico (Uncle.Rico291@gmail.com) writes:
> HI IS THERE A WAY TO GET MY PROC FASTER IT RUNS OK NOW BUT I JUST NEED
> IT FASTER THANKS.


It's a very long procedure, and without knowledge of the tables etc,
I don't think you should expect this audience to put the magic finger
on the sensitive spot.

In general: you are using cursors, and cursors are often a recipe for
slow-running code. I did not analyse what you cursors are doing, but you
could try replacing them with set-based operations. If you keep the cursors,
put INSENSITIVE before the CURSOR keyword. This can sometimes help.

Even more general: it's pointless trying to look at this beast as a whole.
Use the SQL Server Profiler, to track down what in the procedure that is
stealing time. Maybe it's just a single statement. Then you can fight
with that statement.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация