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.
Author |
Topic |
gauravsyntel
Starting Member
4 Posts |
Posted - 2011-05-09 : 06:34:09
|
Hello geeks,I am trying to optimize one SP.So should I use triggers cursor or temp table to loop.I want to use values of each row for processing in loop.Which will work faster?Advice ? |
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2011-05-09 : 06:42:18
|
Why do you need to loop at all?There is probably a much better set based way to improve the query, why not post an example of what you have and what you are trying to achieve? |
 |
|
lionofdezert
Aged Yak Warrior
885 Posts |
Posted - 2011-05-09 : 06:45:10
|
triggers and temp tables are two seprate things. In what type of loop you wanna use any of these structures?--------------------------http://connectsql.blogspot.com/ |
 |
|
gauravsyntel
Starting Member
4 Posts |
Posted - 2011-05-10 : 01:22:29
|
Posted - 05/09/2011 : 06:34:09 -------------------------------------------------------------------------------- Hello geeks,I am trying to optimize one SP.So should I use triggers cursor or temp table to loop.I want to use values of each row for processing in loop.Which will work faster?Advice ? |
 |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2011-05-10 : 07:16:25
|
As already mentioned, cursors and temp tables are completely separate concepts, as are triggers. Unless you provide more detail (again already mentioned) about what you're trying to do we cannot help you. |
 |
|
|
|
|