Don't Bite Off More than You Can Chew - Take it in Chunks
2022TL; DR
How you can improve performance by splitting up large operations in chunks
Session Details
Any SQL programmer with some experience knows that loops are bad and that you should work with all data at once in set-based statements. However, you may have experienced situations where this strategy did not work out well and you ran into problems like out-growing the transaction log or blocking other users.
You can solve this by operating on the data in chunks. Implementing chunking is not that difficult, but there are still pitfalls you can run into. In this session, I will discuss in what situations you may want to use chunking. I will give some best practices for how to implement chunking for good performance and I will highlight some things you need keep in mind, for instance, recovering from interruptions.
I will also look at how you can use chunking for error handling: You want process many rows and you want the good rows to succeed even if some rows yield errors – something you cannot do in a single set-based statement.
Feedback Link - https://sqlb.it/?7035
You can solve this by operating on the data in chunks. Implementing chunking is not that difficult, but there are still pitfalls you can run into. In this session, I will discuss in what situations you may want to use chunking. I will give some best practices for how to implement chunking for good performance and I will highlight some things you need keep in mind, for instance, recovering from interruptions.
I will also look at how you can use chunking for error handling: You want process many rows and you want the good rows to succeed even if some rows yield errors – something you cannot do in a single set-based statement.
Feedback Link - https://sqlb.it/?7035
3 things you'll get out of this session
Speakers
Erland Sommarskog's previous sessions
Don’t Let Your Permissions Be Hijacked!
Learn how malicious users can lure a power user such as sysadmin to run code that performs action to the benefit of the evil user by something I call permission hijacking and what means you can take to prevent this from happening.
Packaging Permissions in Stored Procedures
Learn in this session how you can package any database- or server-level permission in a stored procedure with help of certificate signing or EXECUTE AS and why one method is to prefer over the other.