In SQL Server stored procedures when to use temporary tables and when to use cursors. which is the best option performance wise?
Cursors work row-by-row and are extremely poor performers. They can in almost all cases be replaced by better set-based code (not normally temp tables though)
Temp tables can be fine or bad depending on the data amount and what you are doing with them. They are not generally a replacement for a cursor.
Suggest you read this: http://wiki.lessthandot.com/index.php/Cursors_and_How_to_Avoid_Them