You might have heard „don’t use cursors, they are slow!”. In this presentation, you will learn that normally you should write set-based statements instead, and I will explain why they generally are faster. But I will also look at situations where using a loop for one reason or another is preferrable, and you will learn that the best way to run a loop in most cases is exactly a cursor, provided that it is implemented properly. I will also gives some tips how you can troubleshoot performance problems with loops and what pitfalls you need to avoid.
