SQL: LIKE vs SUBSTRING vs LEFT/RIGHT vs CHARINDEX
LIKE vs SUBSTRING vs LEFT/RIGHT vs CHARINDEX All too often developers need to query a database table for records which begin and/or end with a certain textual pattern. For instance,…
SQL: Fastest way to insert new records where one doesn’t already exist
Fastest way to insert new records where one doesn’t already exist SQL Developers come across this scenario quite often – having to insert records into a table where a record…
Increase SQL Server tempdb Performance
Increase SQL Server tempdb Performance In this article I hope to shed light on some very simple ways to increase SQL Server tempdb performance. As an SQL developer, I’ve spent…
SQL: Fastest way to compare multiple column values
Fastest way to compare multiple column values I was recently working on a project with stored procedures that had a significant amount of column comparisons in a MERGE statement. This…
C#: Is It Faster to Preallocate Dictionary Sizes?
C#: Is It Faster to Preallocate Dictionary Sizes? This test will benchmark populating C# Dictionary and ConcurrentDictionary objects to determine in C#: is it faster to preallocate dictionary sizes? Or…
Fastest Way to Compare Strings in C# .Net
Fastest Way to Compare Strings in C# .Net What is the fastest way to compare strings in C# .Net? Everyone’s had to do it. A lot of people instinctively use…
Fastest Collection for String Lookups in C# .Net
Fastest Collection for String Lookups in C# .Net All C# programmers have had to do this at some point in their career… look for a particular string as some sort…
Faster to Trim during or after assignment in C# .Net
Faster to Trim during or after assignment in C# .Net Does it make a difference if you Trim() during or after assigning a value to a variable in C# .Net?…
C#.Net: The Fastest Way to count substring occurrences in a string
C#.Net: The Fastest Way to count substring occurrences in a string This will examine many techniques to determine in C# .Net: the Fastest Way to count substring occurrences in a…
C# .Net: Fastest Way to Clear Collections
C# .Net: Fastest Way to clear Collections In this article I’ll investigate different ways to clear out commonly used Collections such as Hashsets, Dictionaries, ConcurrentDictionaries, ArrayLists, and Arrays, benchmarking the…